-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
33 lines (31 loc) · 1.12 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
const Encore = require("@symfony/webpack-encore");
const path = require("path");
module.exports = {
get(Encore) {
const path = require('path');
Encore
.setOutputPath('public/frontend/build/')
.setPublicPath('/frontend/build')
.enablePostCssLoader((options) => {
options.postcssOptions = {
config: path.resolve(__dirname, 'postcss.config.js')
}
})
.addEntry('app', './assets/frontend/app.js')
.enableStimulusBridge('./assets/controllers.json')
.splitEntryChunks()
.enableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.enableBuildNotifications()
.enableSourceMaps(!Encore.isProduction())
.enableVersioning(Encore.isProduction())
.configureBabel((config) => {
config.plugins.push('@babel/plugin-proposal-class-properties');
})
.configureBabelPresetEnv((config) => {
config.useBuiltIns = 'usage';
config.corejs = 3;
})
;
}
}