Unverified Commit ada41a8b authored by illuminist's avatar illuminist Committed by GitHub

Update next-bundle-analyzer readme (#14976)

https://github.com/vercel/next.js/issues/14969

It didn't specify on how to include the config with function config. This PR clarify the way to use the config with function. 
parent 33ebda1b
...@@ -25,6 +25,14 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({ ...@@ -25,6 +25,14 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
module.exports = withBundleAnalyzer({}) module.exports = withBundleAnalyzer({})
``` ```
Or configuration as a function:
```js
module.exports = (phase, defaultConfig) => {
return withBundleAnalyzer(defaultConfig)
}
```
Then you can run the command below: Then you can run the command below:
```bash ```bash
......
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