2017-02-14 02:24:50 +00:00
|
|
|
const {BundleAnalyzerPlugin} = require('webpack-bundle-analyzer')
|
|
|
|
module.exports = {
|
|
|
|
webpack: (config, { dev }) => {
|
|
|
|
// Perform customizations to config
|
|
|
|
config.plugins.push(
|
|
|
|
new BundleAnalyzerPlugin({
|
2017-02-15 12:42:48 +00:00
|
|
|
analyzerMode: 'disabled',
|
2017-02-14 02:24:50 +00:00
|
|
|
// For all options see https://github.com/th0r/webpack-bundle-analyzer#as-plugin
|
2017-02-15 12:42:48 +00:00
|
|
|
generateStatsFile: true,
|
|
|
|
// Will be available at `.next/stats.json`
|
|
|
|
statsFilename: 'stats.json'
|
2017-02-14 02:24:50 +00:00
|
|
|
})
|
|
|
|
)
|
|
|
|
// Important: return the modified config
|
|
|
|
return config
|
|
|
|
}
|
|
|
|
}
|