Explorar o código

Update next.config.js

Aykut Saraç %!s(int64=2) %!d(string=hai) anos
pai
achega
0126cd37e8
Modificáronse 1 ficheiros con 6 adicións e 3 borrados
  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}