瀏覽代碼

fix: skip withSuperjson in production server phase to prevent errors

Shun Miyazawa 6 月之前
父節點
當前提交
869e1167a3
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      apps/app/next.config.js

+ 3 - 1
apps/app/next.config.js

@@ -160,8 +160,10 @@ module.exports = async (phase) => {
   };
 
   // production server
+  // Skip withSuperjson() in production server phase because the pages directory
+  // doesn't exist in the production build and withSuperjson() tries to find it
   if (phase === PHASE_PRODUCTION_SERVER) {
-    return withSuperjson()(nextConfig);
+    return nextConfig;
   }
 
   const withBundleAnalyzer = require('@next/bundle-analyzer')({