-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
26 lines (24 loc) · 963 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
var Encore = require('@symfony/webpack-encore');
Encore
.setOutputPath('src/Resources/public/js/')
.addEntry('contao-list-bundle', './src/Resources/assets/js/contao-list-bundle.js')
.setPublicPath('/public/js/')
.setPublicPath('/bundles/heimrichhannotlistbundle/')
.setManifestKeyPrefix('bundles/heimrichhannotlistbundle')
.disableSingleRuntimeChunk()
.addExternals({
'@hundh/contao-utils-bundle': 'utilsBundle',
'bootstrap': 'bootstrap',
}
)
.splitEntryChunks()
.configureSplitChunks(function(splitChunks) {
splitChunks.name = function (module, chunks, cacheGroupKey) {
const moduleFileName = module.identifier().split('/').reduceRight(item => item).split('.').slice(0, -1).join('.');
return `${moduleFileName}`;
};
})
.disableSingleRuntimeChunk()
.enableSourceMaps(!Encore.isProduction())
;
module.exports = Encore.getWebpackConfig();