Skip to content

Commit

Permalink
fix: missing app dir check
Browse files Browse the repository at this point in the history
  • Loading branch information
wyattjoh committed May 6, 2024
1 parent 9345844 commit 10b8808
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/next/src/server/base-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,9 @@ export default abstract class Server<

this.enabledDirectories = this.getEnabledDirectories(dev)

const isAppPPREnabled = checkIsAppPPREnabled(
this.nextConfig.experimental.ppr
)
const isAppPPREnabled =
this.enabledDirectories.app &&
checkIsAppPPREnabled(this.nextConfig.experimental.ppr)

this.normalizers = {
// We should normalize the pathname from the RSC prefix only in minimal
Expand All @@ -489,7 +489,10 @@ export default abstract class Server<
this.enabledDirectories.app && isAppPPREnabled && this.minimalMode
? new PostponedPathnameNormalizer()
: undefined,
rsc: this.minimalMode ? new RSCPathnameNormalizer() : undefined,
rsc:
this.enabledDirectories.app && this.minimalMode
? new RSCPathnameNormalizer()
: undefined,
prefetchRSC:
this.enabledDirectories.app && isAppPPREnabled && this.minimalMode
? new PrefetchRSCPathnameNormalizer()
Expand Down

0 comments on commit 10b8808

Please sign in to comment.