18a9c7e371
* Update `packages/` * Update examples * Update tests * Update bench * Update top level files * Fix build * trigger
21 lines
561 B
JavaScript
21 lines
561 B
JavaScript
const withBundleAnalyzer = require('@zeit/next-bundle-analyzer')
|
|
|
|
const nextConfig = {
|
|
analyzeServer: ['server', 'both'].includes(process.env.BUNDLE_ANALYZE),
|
|
analyzeBrowser: ['browser', 'both'].includes(process.env.BUNDLE_ANALYZE),
|
|
bundleAnalyzerConfig: {
|
|
server: {
|
|
analyzerMode: 'static',
|
|
reportFilename: '../bundles/server.html',
|
|
},
|
|
browser: {
|
|
analyzerMode: 'static',
|
|
reportFilename: '../bundles/client.html',
|
|
},
|
|
},
|
|
webpack(config) {
|
|
return config
|
|
},
|
|
}
|
|
|
|
module.exports = withBundleAnalyzer(nextConfig)
|