-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
34 lines (27 loc) · 1.04 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
const Encore = require('@symfony/webpack-encore');
Encore
.setOutputPath('dist/app/')
.setPublicPath('/app/')
.addEntry('background', './src/background/background.ts')
// .addEntry('profile-page', './src/profile-page/index.ts')
.addEntry('page-script', './src/page-script/index.ts')
.addEntry('flagmod-plus', './src/flagmod-plus/index.ts')
// .addEntry('photo-review', './src/profile-page/photo-review/photo-review.ts')
.addEntry('options', './src/options/index.ts')
// https://symfony.com/doc/current/frontend.html#adding-more-features
.cleanupOutputBeforeBuild()
.enableBuildNotifications()
.enableSourceMaps(false)
.enableVersioning(false)
.enableTypeScriptLoader()
.enableSassLoader()
.disableSingleRuntimeChunk()
.configureBabel((babelConfig) => {
babelConfig.plugins.push(['@babel/plugin-transform-runtime', { regenerator: true }]);
});
const config = Encore.getWebpackConfig();
config.watchOptions = {
poll: true,
ignored: /node_modules/,
};
module.exports = config;