Explorar el Código

Update next.config.js

Aykut Saraç hace 2 años
padre
commit
0126cd37e8
Se han modificado 1 ficheros con 6 adiciones y 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}