aboutsummaryrefslogtreecommitdiffstats
path: root/next.config.js
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-02-02 17:46:14 +0100
committerArmand Philippot <git@armandphilippot.com>2022-02-02 17:46:14 +0100
commit8f0fadc3a1a331956bef3aa299a1c468927bcdf0 (patch)
tree6f4bed89c34b3a0433c4940c76540e58fa802e8b /next.config.js
parentc31fd1712bc0b7f8c60ab206554154472dcf6eaa (diff)
build(deps): add bundle analyzer to examine bundle sizes on build
Diffstat (limited to 'next.config.js')
-rw-r--r--next.config.js6
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));