rsnext/test/integration/bundle-size-profiling/next.config.js
Tim Neutkens 162f11c0c0
Add extra profiling app (#10568)
Just another app that I’ve been using for analysis
2020-02-18 10:30:34 +01:00

22 lines
538 B
JavaScript

module.exports = {
experimental: {
polyfillsOptimization: true,
},
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
},
}