Skip to content

Commit 63023ee

Browse files
authored
Merge pull request #10573 from growilabs/fix/skip-withsuperjson-in-production-server
fix: Skip withSuperjson() in production server
2 parents 2e50c64 + 869e116 commit 63023ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/app/next.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,10 @@ module.exports = async (phase) => {
160160
};
161161

162162
// production server
163+
// Skip withSuperjson() in production server phase because the pages directory
164+
// doesn't exist in the production build and withSuperjson() tries to find it
163165
if (phase === PHASE_PRODUCTION_SERVER) {
164-
return withSuperjson()(nextConfig);
166+
return nextConfig;
165167
}
166168

167169
const withBundleAnalyzer = require('@next/bundle-analyzer')({

0 commit comments

Comments
 (0)