2019-02-19 22:45:07 +01:00
|
|
|
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
|
2018-10-20 17:03:19 +02:00
|
|
|
module.exports = {
|
2019-11-11 04:24:53 +01:00
|
|
|
webpack(config, { isServer }) {
|
2019-05-30 03:19:32 +02:00
|
|
|
config.plugins.push(
|
|
|
|
new BundleAnalyzerPlugin({
|
|
|
|
analyzerMode: 'static',
|
|
|
|
reportFilename: `dist/${isServer ? 'server' : 'client'}.html`,
|
2019-11-11 04:24:53 +01:00
|
|
|
openAnalyzer: false,
|
2019-05-30 03:19:32 +02:00
|
|
|
})
|
|
|
|
)
|
2018-11-28 15:03:02 +01:00
|
|
|
return config
|
|
|
|
},
|
2018-10-20 17:03:19 +02:00
|
|
|
onDemandEntries: {
|
|
|
|
// Make sure entries are not getting disposed.
|
2019-11-11 04:24:53 +01:00
|
|
|
maxInactiveAge: 1000 * 60 * 60,
|
2019-07-25 04:16:32 +02:00
|
|
|
},
|
|
|
|
experimental: {
|
2019-11-11 04:24:53 +01:00
|
|
|
modern: true,
|
|
|
|
},
|
2018-10-20 17:03:19 +02:00
|
|
|
}
|