Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support shared component with next built-in client components (#35975)
Fixes #35449 Include the shared components (from source code) is in client bundles, previously we lost them so that the client components imported by them are lost in module graph * let flight server loader apply to all pages and imported modules (except node_modules at the moment) * if it's a shared component from source code, include it in client bundle * ignore handling node_modules at the moment (due to the limitation support of esm imports with RSC) ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md`
- Loading branch information
Showing
9 changed files
with
91 additions
and
64 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
File renamed without changes.
4 changes: 1 addition & 3 deletions
4
test/integration/react-streaming-and-server-components/app/pages/external-imports.server.js
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 |
---|---|---|
@@ -1,11 +1,9 @@ | ||
import moment from 'moment' | ||
import nonIsomorphicText from 'non-isomorphic-text' | ||
|
||
export default function Page() { | ||
return ( | ||
<div> | ||
<div>date:{moment().toString()}</div> | ||
<div>{nonIsomorphicText()}</div> | ||
<div>date:{nonIsomorphicText()}</div> | ||
</div> | ||
) | ||
} |
2 changes: 1 addition & 1 deletion
2
test/integration/react-streaming-and-server-components/app/pages/index.server.js
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
2 changes: 1 addition & 1 deletion
2
test/integration/react-streaming-and-server-components/app/pages/next-api/link.server.js
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
2 changes: 1 addition & 1 deletion
2
test/integration/react-streaming-and-server-components/app/pages/streaming-rsc.server.js
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