diff --git a/next.config.js b/next.config.js index df99d7ac..43ff8b0d 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,7 @@ -module.exports = { +const withBundleAnalyzer = require('@next/bundle-analyzer')({ + enabled: process.env.ANALYZE === 'true' +}) +module.exports = withBundleAnalyzer({ future: { webpack5: true }, @@ -29,4 +32,4 @@ module.exports = { } return config } -} +}) diff --git a/package.json b/package.json index b8b2de14..3dc26fd2 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "post-build": "next-sitemap --config next-sitemap.config.js" }, "dependencies": { + "@next/bundle-analyzer": "^12.1.1", "@popperjs/core": "^2.9.3", "animate.css": "^4.1.1", "axios": ">=0.21.1",