forked from tgalopin/enpremiereligne.fr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
30 lines (26 loc) · 970 Bytes
/
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
var Encore = require('@symfony/webpack-encore');
if (!Encore.isRuntimeEnvironmentConfigured()) {
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}
Encore
.setOutputPath('public/build/')
.setPublicPath('/build')
.addStyleEntry('lib', './assets/scss/lib.scss')
.addStyleEntry('app', './assets/scss/app.scss')
.addEntry('request', './assets/jsx/request.jsx')
.addEntry('request-vulnerable', './assets/jsx/request-vulnerable.jsx')
.addEntry('helper', './assets/jsx/helper.jsx')
.addEntry('captcha', './assets/js/captcha.js')
.splitEntryChunks()
.enableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.enableSourceMaps(!Encore.isProduction())
.enableVersioning(Encore.isProduction())
.configureBabelPresetEnv((config) => {
config.useBuiltIns = 'usage';
config.corejs = 3;
})
.enableSassLoader()
.enablePreactPreset()
;
module.exports = Encore.getWebpackConfig();