diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-02-02 17:46:14 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-02-02 17:46:14 +0100 |
| commit | 8f0fadc3a1a331956bef3aa299a1c468927bcdf0 (patch) | |
| tree | 6f4bed89c34b3a0433c4940c76540e58fa802e8b /next.config.js | |
| parent | c31fd1712bc0b7f8c60ab206554154472dcf6eaa (diff) | |
build(deps): add bundle analyzer to examine bundle sizes on build
Diffstat (limited to 'next.config.js')
| -rw-r--r-- | next.config.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/next.config.js b/next.config.js index d9a31ee..f6aff19 100644 --- a/next.config.js +++ b/next.config.js @@ -71,6 +71,10 @@ const nextConfig = { }, }; +const withBundleAnalyzer = require('@next/bundle-analyzer')({ + enabled: process.env.ANALYZE === 'true', +}); + const withMDX = require('@next/mdx')({ extension: /\.mdx?$/, options: { @@ -79,4 +83,4 @@ const withMDX = require('@next/mdx')({ }, }); -module.exports = withMDX(nextConfig); +module.exports = withBundleAnalyzer(withMDX(nextConfig)); |
