diff --git a/examples/with-webpack-bundle-analyzer/next.config.js b/examples/with-webpack-bundle-analyzer/next.config.js index ad085831..1bdbe095 100644 --- a/examples/with-webpack-bundle-analyzer/next.config.js +++ b/examples/with-webpack-bundle-analyzer/next.config.js @@ -2,11 +2,11 @@ const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') const { ANALYZE } = process.env module.exports = { - webpack: function (config) { + webpack: function (config, { isServer }) { if (ANALYZE) { config.plugins.push(new BundleAnalyzerPlugin({ analyzerMode: 'server', - analyzerPort: 8888, + analyzerPort: isServer ? 8888 : 8889, openAnalyzer: true })) }