forked from 123inkt/123view
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
28 lines (25 loc) · 977 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
const Encore = require('@symfony/webpack-encore');
if (!Encore.isRuntimeEnvironmentConfigured()) {
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}
Encore
.setOutputPath('public/build/')
.setPublicPath('/build')
.addEntry('app', './assets/app.ts')
.addEntry('app.dark', './assets/app.dark.ts')
.addEntry('app.light', './assets/app.light.ts')
.addEntry('bs.theme', './assets/bootstrap-theme.ts')
.enableStimulusBridge('./assets/controllers.json')
.splitEntryChunks()
.enableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.enableSourceMaps(!Encore.isProduction())
.enableVersioning(Encore.isProduction())
.configureBabelPresetEnv((config) => {
config.useBuiltIns = 'usage';
config.corejs = '3.26';
})
.enableSassLoader()
.enableTypeScriptLoader()
;
module.exports = Encore.getWebpackConfig();