From 2c1cdd324b642fcef19a5050a66a557d9782230c Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Mon, 28 Mar 2022 16:45:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9D=E8=B5=96=E5=8C=85=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- next.config.js | 7 +++++-- package.json | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) 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",