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:
parent
b5003ffb8b
commit
f85a0bd550
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue