rsnext/test/integration/bundle-size-profiling/next.config.js
Tim Neutkens 0222a09cd0
Enable polyfillsOptimization (#10574)
* Enable polyfillsOptimization

* Update sizes

* Commons is no longer there

* Update test
2020-02-18 19:26:55 +01:00

19 lines
482 B
JavaScript

module.exports = {
webpack(config, options) {
if (!options.isServer) {
config.profile = true
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
config.plugins.push(
new BundleAnalyzerPlugin({
generateStatsFile: true,
analyzerMode: 'static',
reportFilename: options.isServer
? '../analyze/server.html'
: './analyze/client.html',
})
)
}
return config
},
}