added @next/bundle-analyzer

This commit is contained in:
Ren Amamiya
2023-04-20 13:34:46 +07:00
parent fbd9627dc0
commit 9c43f56aaa
3 changed files with 123 additions and 2 deletions
+6 -2
View File
@@ -2,7 +2,11 @@
* @type {import('next').NextConfig}
*/
const nextConfig = {
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
const nextConfig = withBundleAnalyzer({
output: 'export',
swcMinify: false,
images: {
@@ -19,6 +23,6 @@ const nextConfig = {
config.experiments = { ...config.experiments, topLevelAwait: true };
return config;
},
};
});
module.exports = nextConfig;