未验证 提交 a03fcbf7 编写于 作者: D Daniel K 提交者: 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.
上级 ae75c6a6
......@@ -51,8 +51,9 @@ const withPlugins = require('next-compose-plugins')
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
module.exports = withPlugins([
[withBundleAnalyzer({})],
[withBundleAnalyzer],
// your other plugins here
])
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册