Unverified Commit a03fcbf7 authored by Daniel K's avatar Daniel K Committed by GitHub

[bundle-analyzer] Fix incorrect example (#18952)

This confused me a lot, because in the case of `withBundleAnalyzer({})` it will ignore any previous config and basically override everything.

Furthermore, it makes more sense to move the call with `enabled` option inside so it's aligned with other plugins approach.
parent ae75c6a6
...@@ -51,8 +51,9 @@ const withPlugins = require('next-compose-plugins') ...@@ -51,8 +51,9 @@ const withPlugins = require('next-compose-plugins')
const withBundleAnalyzer = require('@next/bundle-analyzer')({ const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true', enabled: process.env.ANALYZE === 'true',
}) })
module.exports = withPlugins([ module.exports = withPlugins([
[withBundleAnalyzer({})], [withBundleAnalyzer],
// your other plugins here // your other plugins here
]) ])
``` ```
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