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-02-19 22:45:07 +01:00
|
|
|
webpack (config, { isServer }) {
|
2018-11-28 15:03:02 +01:00
|
|
|
config.plugins.push(new BundleAnalyzerPlugin({
|
|
|
|
analyzerMode: 'static',
|
|
|
|
reportFilename: `dist/${isServer ? 'server' : 'client'}.html`,
|
|
|
|
openAnalyzer: false
|
|
|
|
}))
|
|
|
|
return config
|
|
|
|
},
|
2018-10-20 17:03:19 +02:00
|
|
|
onDemandEntries: {
|
|
|
|
// Make sure entries are not getting disposed.
|
|
|
|
maxInactiveAge: 1000 * 60 * 60
|
|
|
|
}
|
|
|
|
}
|