-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(rsc): Preinit client component css for server components in production #10210
Merged
Conversation
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
Josh-Walker-GM
added
release:fix
This PR is a fix
changesets-ok
Override the changesets check
labels
Mar 12, 2024
@dac09 are you happy to give this one a review when you get time? I'd like it if we could confirm this is needed if the photo app seems to work without any specific CSS work? I'm also happy to debug those windows tests when I get home and have a windows machine available. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
changesets-ok
Override the changesets check
fixture-ok
Override the test project fixture check
release:fix
This PR is a fix
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Currently RSC during
yarn rw serve
would not load the CSS of nested client components. In development, things appear to work fine without additional manipulation due to the vite dev server.Approach
During build, we insert preinit calls into server components that cause the browser to load all CSS that is needed for any client component that the server component will cause to be loaded.
Changes
preinit
calls to load CSS assets into server components that would require them because they load client components that have associated CSS assets.Notes