Skip to content

chore(rsc): update vite-rsc for automatic server css support #13826

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

Open
wants to merge 3 commits into
base: rsc
Choose a base branch
from

Conversation

hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Jun 18, 2025

Hey, I'm iterating server css support and this is just one attempt to make it easier for certain routing system. I'm sharing it here in case you are interested. Here is an updated API https://github.com/hi-ogawa/vite-plugins/tree/main/packages/rsc#idvite-rsc-css-exportname. Please feel free to take or close it.


Putting it to draft as I'm thinking more automatic approach.

Copy link

changeset-bot bot commented Jun 18, 2025

⚠️ No Changeset found

Latest commit: c03f1a6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

@Hardanish-Singh Hardanish-Singh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@brookslybrand
Copy link
Contributor

Hey @Hardanish-Singh I appreciate you trying to be helpful, but approvals and comments like these aren't helpful, they just add noise. I've seen you jump on a number of PRs with what are essentially auto approvals. If I keep seeing it I'm going to have to block you

Please refrain from reviewing PRs in the future unless you are actually giving feedback on the code

@hi-ogawa hi-ogawa marked this pull request as draft June 20, 2025 06:03
@markdalgleish
Copy link
Member

@hi-ogawa What about routes with multiple component exports? Will the API support this?

Also, have you see the way Parcel handles this? https://github.com/parcel-bundler/parcel/blob/d948759d2fd502bc0c76cf87480f6fb12d2a2ee6/packages/runtimes/rsc/rsc-helpers.jsx#L22-L90 — it's a bit wild, but I like that consumers don't need to think about it.

@hi-ogawa
Copy link
Contributor Author

Yes, I've seen Parcel's idea and I'm experimenting with something similar too. I actually just landed this one hi-ogawa/vite-plugins#1030, so I'll update the example here.

@hi-ogawa hi-ogawa changed the title chore(rsc): update vite-rsc and use css export transform chore(rsc): update vite-rsc for automatic server css support Jun 20, 2025
@hi-ogawa hi-ogawa marked this pull request as ready for review June 20, 2025 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants