-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Read page name from work store in server module map proxy (#71669)
This avoids a race condition when running `next build` where the manifest singleton might be overwritten with the next page's manifest while the previous page is still being rendered. With this PR, we are not storing a page-specific singleton but the whole manifest, and only when accessing an entry is the page read from the work store, and thus scoped to the current page. An exception is when a server module map is needed during module evaluation when no work store is provided, e.g. to create a server action using a higher-order function. In this case it should be safe to return any entry from the manifest that matches the action ID. They all refer to the same module ID, which must also exist in the current page bundle. (This is currently not guaranteed in Turbopack, and needs to be fixed.)
- Loading branch information
1 parent
b258244
commit 03ff785
Showing
5 changed files
with
31 additions
and
14 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 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 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