Changeset View
Changeset View
Standalone View
Standalone View
swh/web/assets/config/webpack.config.production.js
Show All 15 Lines | |||||
// override mode to production | // override mode to production | ||||
webpackProdConfig.mode = 'production'; | webpackProdConfig.mode = 'production'; | ||||
// configure minimizer for js and css assets | // configure minimizer for js and css assets | ||||
webpackProdConfig.optimization.minimizer = [ | webpackProdConfig.optimization.minimizer = [ | ||||
// use terser for minimizing js and generate source map files | // use terser for minimizing js and generate source map files | ||||
new TerserPlugin({ | new TerserPlugin({ | ||||
cache: true, | parallel: true | ||||
parallel: true, | |||||
sourceMap: true | |||||
}), | }), | ||||
// use cssnano for minimizing css and generate source map files | // use cssnano for minimizing css and generate source map files | ||||
new OptimizeCSSAssetsPlugin({ | new OptimizeCSSAssetsPlugin({ | ||||
cssProcessorOptions: { | cssProcessorOptions: { | ||||
map: { | map: { | ||||
inline: false, | inline: false, | ||||
annotation: true | annotation: true | ||||
}, | }, | ||||
Show All 12 Lines |