From ada41a8bd065bb2395a54694ec1a5998a8f9072a Mon Sep 17 00:00:00 2001 From: illuminist Date: Thu, 9 Jul 2020 15:24:21 +0700 Subject: [PATCH] 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. --- packages/next-bundle-analyzer/readme.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/next-bundle-analyzer/readme.md b/packages/next-bundle-analyzer/readme.md index 1d2ac2d2f0..5ddf2b8f08 100644 --- a/packages/next-bundle-analyzer/readme.md +++ b/packages/next-bundle-analyzer/readme.md @@ -25,6 +25,14 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({ module.exports = withBundleAnalyzer({}) ``` +Or configuration as a function: + +```js +module.exports = (phase, defaultConfig) => { + return withBundleAnalyzer(defaultConfig) +} +``` + Then you can run the command below: ```bash -- GitLab