1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

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 💃
This commit is contained in:
Kyle Holmberg 2018-09-10 03:00:45 -07:00 committed by Tim Neutkens
parent b5003ffb8b
commit f85a0bd550

View file

@ -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,