Skip to content
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

RSC: Vite plugin for route loading #10252

Merged
merged 6 commits into from
Mar 17, 2024
Merged

Conversation

Josh-Walker-GM
Copy link
Collaborator

@Josh-Walker-GM Josh-Walker-GM commented Mar 17, 2024

Problem
We have to be smarter about how we automatically load route pages during dev. As a result, we have refactored out the logic into a vite plugin which has access to knowledge about whether it is being built for (or served for) SSR.

Changes

  1. Removed babel plugins for the RSC server and client route loading
  2. Added a vite plugin which uses babel to automatically import the route pages
  3. Refactored the react vite plugin back into the root config in index.ts as it no longer has to be specifically applied in the various vite build or create calls.

@Josh-Walker-GM Josh-Walker-GM added release:fix This PR is a fix changesets-ok Override the changesets check labels Mar 17, 2024
@Josh-Walker-GM Josh-Walker-GM added this to the RSC milestone Mar 17, 2024
@Josh-Walker-GM Josh-Walker-GM self-assigned this Mar 17, 2024
@Josh-Walker-GM Josh-Walker-GM changed the title RSC: RSC: Vite plugin for route loading Mar 17, 2024
@Josh-Walker-GM Josh-Walker-GM marked this pull request as ready for review March 17, 2024 20:38
@Josh-Walker-GM Josh-Walker-GM enabled auto-merge (squash) March 17, 2024 22:13
@Josh-Walker-GM Josh-Walker-GM merged commit 43ca27a into main Mar 17, 2024
44 checks passed
@Josh-Walker-GM Josh-Walker-GM deleted the jgmw-rsc/dev-routes-ssr branch March 17, 2024 22:20
@Josh-Walker-GM Josh-Walker-GM modified the milestones: RSC, v8.0.0 Sep 4, 2024
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 release:fix This PR is a fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants