-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
38 lines (25 loc) · 1.03 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const Encore = require('@symfony/webpack-encore');
const path = require("path");
Encore.reset();
Encore
// the project directory where all compiled assets will be stored
.setOutputPath(`./bundle/Resources/public/build/`)
// the public path used by the web server to access the previous directory
.setPublicPath(`/bundles/netgenibexafieldtypehtmltext/build`)
.addEntry('app', `./bundle/Resources/js/app.js`)
.addEntry('admin_app', `./bundle/Resources/js/ibexa_admin.js`)
.setManifestKeyPrefix('build/')
// empty the outputPath dir before each build
.cleanupOutputBeforeBuild()
.disableSingleRuntimeChunk()
// enables @babel/preset-env polyfills
.configureBabelPresetEnv((config) => {
config.useBuiltIns = 'entry';
config.corejs = 3;
});
const nghtmltextApp = Encore.getWebpackConfig();
nghtmltextApp.watchOptions = { poll: true, ignored: /node_modules/ };
nghtmltextApp.name = 'nghtmltext';
Encore.reset();
// export the final configuration
module.exports = [nghtmltextApp];