From 8f0fadc3a1a331956bef3aa299a1c468927bcdf0 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 2 Feb 2022 17:46:14 +0100 Subject: build(deps): add bundle analyzer to examine bundle sizes on build --- next.config.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'next.config.js') 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)); -- cgit v1.2.3