Commit f85a0bd5 authored by Kyle Holmberg's avatar Kyle Holmberg Committed by Tim Neutkens

Update next.config in with-webpack-bundle-analyzer example to avoid issue with…

Update next.config in with-webpack-bundle-analyzer example to avoid issue with Next.js in CI (#5135)

See: https://spectrum.chat/thread/030243b0-7ebf-434c-8e02-5f54ea30f3b6

Build works now 💃 
parent b5003ffb
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
const { ANALYZE } = process.env const { ANALYZE } = process.env
module.exports = { module.exports = {
webpack: function (config, { isServer }) { webpack: function (config, { isServer }) {
if (ANALYZE) { if (ANALYZE) {
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
config.plugins.push(new BundleAnalyzerPlugin({ config.plugins.push(new BundleAnalyzerPlugin({
analyzerMode: 'server', analyzerMode: 'server',
analyzerPort: isServer ? 8888 : 8889, analyzerPort: isServer ? 8888 : 8889,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment