Browse Source

Update next.config.js

Aykut Saraç 2 years ago
parent
commit
0126cd37e8
1 changed files with 6 additions and 3 deletions
  1. 6 3
      next.config.js

+ 6 - 3
next.config.js

@@ -1,6 +1,9 @@
-const withBundleAnalyzer = require("@next/bundle-analyzer")({
-  enabled: process.env.ANALYZE === "true",
-});
+const withBundleAnalyzer =
+  process.env.ANALYZE === "true"
+    ? require("@next/bundle-analyzer")({
+        enabled: process.env.ANALYZE === "true",
+      })()
+    : x => x;
 
 /**
  * @type {import('next').NextConfig}