-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Split Route Modules #11871
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
Merged
Merged
Split Route Modules #11871
Changes from 75 commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
0f6a1c7
WIP: Route chunks
markdalgleish df7d79d
Merge branch 'dev' into markdalgleish/route-chunks
markdalgleish 5166d95
Merge branch 'dev' into markdalgleish/route-chunks
markdalgleish b4c0f70
Migrate playground to routes.ts
markdalgleish 7a4fa89
Separate ctx checks from splitting logic
markdalgleish f16cada
Add initial `hasChunkableExport` implementation
markdalgleish e54e8ca
Add initial route chunk generation logic
markdalgleish 3b76b6d
Wire up route chunks logic to Vite plugin
markdalgleish 67b1545
Merge branch 'dev' into markdalgleish/route-chunks
markdalgleish e93ae9b
Add initial route chunks HMR support
markdalgleish 5b44c36
Handle new route chunks during HMR
markdalgleish c46b97a
Fix clientAction chunk query string typo
markdalgleish 287a3bf
Add caching to route chunks logic
markdalgleish 359318e
Improve route chunk generation performance
markdalgleish c6fb80b
Preload route chunks
markdalgleish 885d5e0
Merge branch 'dev' into markdalgleish/route-chunks
markdalgleish b883bf6
Optimize route chunk import statements
markdalgleish 09d9dfd
Leave side effect imports in main route chunk
markdalgleish 1986eab
Handle shared export statements in route chunks
markdalgleish 90399a3
Split exported variable declarations in route chunks
markdalgleish e4fcc7c
Merge branch 'dev' into markdalgleish/route-chunks
markdalgleish 825024d
Handle destructured exports in route chunks
markdalgleish 6ade31d
Improve route chunk dependency analysis
markdalgleish f252822
Add more route chunk unit tests
markdalgleish 61cfbd6
Fix duplicate route chunk code
markdalgleish 6564892
Merge branch 'dev' into markdalgleish/route-chunks
markdalgleish cb037e6
Support shared imports in route chunks
markdalgleish 9a2ddcf
Add route chunks integration test
markdalgleish d8697b2
Skip route chunk HMR preloads when disabled
markdalgleish aa59841
Refactor to reduce diff
markdalgleish 4131c27
Add route chunks playground
markdalgleish ee63047
Update lockfile
markdalgleish c6efa78
Merge branch 'dev' into markdalgleish/route-chunks
markdalgleish 43ec44b
Fix import removal for omitted route chunks
markdalgleish 8db4099
Increase precedence of route chunk downloads
markdalgleish 2012d2f
Add option to enforce route chunks
markdalgleish bf71c19
Merge branch 'dev' into markdalgleish/route-chunks
markdalgleish e0fb3b4
Fix playground type error
markdalgleish 740f556
Merge branch 'dev' into markdalgleish/route-chunks
markdalgleish 0696c00
Fix type errors
markdalgleish 1679853
Stop chunking routes in dev
markdalgleish 7e77c73
Fix "Generated an empty chunk" warnings
markdalgleish 472e043
Clean up tests
markdalgleish 728b7e9
Remove unused import
markdalgleish d44c0b9
Merge branch 'dev' into markdalgleish/route-chunks
markdalgleish 9eb4c37
Create chunks for HydrateFallback
markdalgleish c4f3463
Fix HydrateFallback validation in SPA mode
markdalgleish b6df5bf
Merge branch 'dev' into markdalgleish/route-chunks
markdalgleish 0ed432e
Remove route-chunks playground entry files
markdalgleish 8afed4c
Run client data and SPA mode tests with route chunks
markdalgleish 2e47509
Add HydrateFallback to bailout check
markdalgleish d75a338
Refactor
markdalgleish 8b2a756
Skip chunking for root route
markdalgleish d493476
Handle assets for route chunks
markdalgleish ca38106
Add HydrateFallback to route chunks test
markdalgleish d312c78
Add CSS to route chunks test
markdalgleish b1485f3
Merge branch 'dev' into markdalgleish/route-chunks
markdalgleish 9df45e1
Skip route chunk build entries when disabled
markdalgleish 30f9f3e
Test mix of chunkable and unchunkable exports
markdalgleish 647d876
Tweak error message
markdalgleish 04a5cda
Rename to "splitRouteModules"
markdalgleish 4da0737
Rename playgrounds
markdalgleish 2fb37e0
Add actions and semi-splittable routes to playgrounds
markdalgleish 0ca355e
Update lockfile
markdalgleish 4077d24
Fix `Route.ComponentProps` usage, update playgrounds
markdalgleish df6bc68
Migrate tests to Route.ComponentProps
markdalgleish 88f9e6e
Prefetch all route module chunks
markdalgleish 7513e6d
Add docs
markdalgleish b009094
Add changeset
markdalgleish b50ca32
Add HydrateFallback to SSR preloads
markdalgleish 9ea41ea
Refactor
markdalgleish 4ac344d
Add shared browser global usage test
markdalgleish ce925a1
Fix export destructuring detection
markdalgleish df0f1df
Merge branch 'dev' into markdalgleish/route-chunks
markdalgleish 3580350
Merge branch 'dev' into markdalgleish/route-chunks
markdalgleish b0f3af3
Remove redundant checks for missing chunks
markdalgleish d545369
Expand docs
markdalgleish File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "@react-router/dev": patch | ||
| "react-router": patch | ||
| --- | ||
|
|
||
| Add unstable support for splitting route modules in framework mode via `future.unstable_splitRouteModules` |
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.