react-router icon indicating copy to clipboard operation
react-router copied to clipboard

WIP: Route chunks

Open markdalgleish opened this issue 1 year ago • 1 comments

https://github.com/remix-run/react-router/issues/11571

TODO:

  • [x] Wire up to Vite plugin.
  • [x] Handle TSX.
  • [x] Ignore types in dependency analysis.
  • [x] HMR
  • [x] Caching
  • [x] Refactor getRouteChunks into singular getRouteChunk to improve performance/caching
  • [x] Ensure all route chunks are preloaded
  • [x] Split shared import statements
  • [x] Handle import side effects
  • [x] Handle export { foo, bar }
  • [x] Handle export { foo, bar as baz } from "./module"
  • [x] Handle export * from "./module"
  • [x] Handle export {}
  • [x] Handle export const foo = ..., bar = ...;
  • [x] Handle export const { foo } = ...; etc.
  • [x] Harden export dependency analysis
  • [x] Ensure consumers importing a route module doesn't result in duplicate code
  • [x] Allow shared imports across chunks
  • [x] Integration tests
  • [x] Ensure HMR can handle addition of main chunk
  • [x] Fix unused import removal in omitChunkedExports now that shared imports don't de-opt
  • [x] Ensure chunked exports download first
  • [x] Strict mode (build breaks on de-opt)
  • [ ] Changeset
  • [ ] Docs
  • [ ] Tidy HMR snippets when route chunks disabled?
  • [ ] Skip route chunk build entries when future flag disabled?
  • [ ] Clean empty route chunks from build output?

markdalgleish avatar Aug 05 '24 06:08 markdalgleish

🦋 Changeset detected

Latest commit: d54536938e3813d362e07d133cea597ee7042a2b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@react-router/dev Patch
react-router Patch
@react-router/fs-routes Patch
@react-router/remix-routes-option-adapter Patch
@react-router/architect Patch
@react-router/cloudflare Patch
react-router-dom Patch
@react-router/express Patch
@react-router/node Patch
@react-router/serve Patch
create-react-router Patch

Not sure what this means? Click here to learn what changesets are.

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

changeset-bot[bot] avatar Aug 05 '24 06:08 changeset-bot[bot]

🤖 Hello there,

We just published version 7.2.0-pre.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

github-actions[bot] avatar Feb 12 '25 16:02 github-actions[bot]

🤖 Hello there,

We just published version 7.2.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

github-actions[bot] avatar Feb 18 '25 20:02 github-actions[bot]

🤖 Hello there,

We just published version 7.3.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

github-actions[bot] avatar Mar 06 '25 21:03 github-actions[bot]