forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the runtime for rsc layer (vercel#65850)
### What Fix a bug introduced in vercel#65694 , use app-page runtime for app router layers ### Why This is basically reverted the route context picking up logic we had before. During the test we found the error thrown > Module not found: shared-runtime module router-context cannot be used in rsc layer Which is caused by a `next/router` imports in rsc page. Decided to revert to what it was before as the most safe way to load share module contexts. It's caused by `next-contentlayer` usage that they're using `next/router` in server component MDX, but we cannot lint error that from node_modules. (We actually can, but disabled that due to various mis-usage of server/client hooks we had before)
- Loading branch information
1 parent
8418852
commit f959eb6
Showing
7 changed files
with
37 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
require('next/router') | ||
|
||
export default function Page() { | ||
return <p>just work</p> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Use `require` to skip the api check | ||
require('next/navigation') | ||
|
||
export default function handle(_, res) { | ||
res.send('just work') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters