From f85a0bd550bcb82419911817cac747a8ad18c6f9 Mon Sep 17 00:00:00 2001 From: Kyle Holmberg Date: Mon, 10 Sep 2018 03:00:45 -0700 Subject: [PATCH] Update next.config in with-webpack-bundle-analyzer example to avoid issue with Next.js in CI (#5135) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See: https://spectrum.chat/thread/030243b0-7ebf-434c-8e02-5f54ea30f3b6 Build works now 💃 --- examples/with-webpack-bundle-analyzer/next.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/with-webpack-bundle-analyzer/next.config.js b/examples/with-webpack-bundle-analyzer/next.config.js index 1bdbe095..0ebbfb61 100644 --- a/examples/with-webpack-bundle-analyzer/next.config.js +++ b/examples/with-webpack-bundle-analyzer/next.config.js @@ -1,9 +1,10 @@ -const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') const { ANALYZE } = process.env module.exports = { webpack: function (config, { isServer }) { if (ANALYZE) { + const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') + config.plugins.push(new BundleAnalyzerPlugin({ analyzerMode: 'server', analyzerPort: isServer ? 8888 : 8889,