Skip to content

chore: Update version for release (pre) #13011

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 2 commits into from
Feb 12, 2025

Conversation

github-actions[bot]
Copy link
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to release-next, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

release-next is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on release-next.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

@react-router/[email protected]

Minor Changes

  • Generate a "SPA fallback" HTML file for scenarios where applications are prerendering the / route with ssr:false (#12948)

    • If you specify ssr:false without a prerender config, this is considered "SPA Mode" and the generated index.html file will only render down to the root route and will be able to hydrate for any valid application path
    • If you specify ssr:false with a prerender config but do not include the / path (i.e., prerender: ['/blog/post']), then we still generate a "SPA Mode" index.html file that can hydrate for any path in the application
    • However, previously if you specified ssr:false and included the / path in your prerender config, we would prerender the / route into index.html as a non-SPA page
      • The generated HTML would include the root index route which prevented hydration for any other paths
      • With this change, we now generate a "SPA Mode" file in __spa-fallback.html that will allow you to hydrate for any non-prerendered paths
      • You can serve this file from your static file server for any paths that would otherwise 404 if you only want to pre-render some routes in your ssr:false app and serve the others as a SPA
      • npx sirv-cli build/client --single __spa-fallback.html
    • Allow a loader in the root route in SPA mode because it can be called/server-rendered at build time (#12948)
    • Route.HydrateFallbackProps now also receives loaderData
      • This will be defined so long as the HydrateFallback is rendering while children routes are loading
      • This will be undefined if the HydrateFallback is rendering because the route has it's own hydrating clientLoader
      • In SPA mode, this will allow you to render loader root data into the SPA index.html

Patch Changes

  • Handle custom envDir in Vite config (#12969)

  • Fix CLI parsing to allow argumentless npx react-router usage (#12925)

  • Skip action-only resource routes when using prerender:true (#13004)

  • Enhance invalid export detection when using ssr:false (#12948)

    • headers/action are prohibited in all routes with ssr:false because there will be no runtime server on which to run them
    • loader functions are more nuanced and depend on whether a given route is prerendered
      • When using ssr:false without a prerender config, only the root route can have a loader
        • This is "SPA mode" which generates a single index.html file with the root route HydrateFallback so it is capable of hydrating for any path in your application - therefore we can only call a root route loader at build time
      • When using ssr:false with a prerender config, you can export a loader from routes matched by one of the prerender paths because those routes will be server rendered at build time
        • Exporting a loader from a route that is never matched by a prerender path will throw a build time error because there will be no runtime server to ever run the loader
  • Limit prerendered resource route .data files to only the target route (#13004)

  • Add unstable support for splitting route modules in framework mode via future.unstable_splitRouteModules (#11871)

  • Add future.unstable_viteEnvironmentApi flag to enable experimental Vite Environment API support (#12936)

  • Disable Lazy Route Discovery for all ssr:false apps and not just "SPA Mode" because there is no runtime server to serve the search-param-configured __manifest requests (#12894)

    • We previously only disabled this for "SPA Mode" which is ssr:false and no prerender config but we realized it should apply to all ssr:false apps, including those prerendering multiple pages
    • In those prerender scenarios we would prerender the /__manifest file assuming the static file server would serve it but that makes some unneccesary assumptions about the static file server behaviors
  • Updated dependencies:

[email protected]

Patch Changes

  • Don't apply Single Fetch revalidation de-optimization when in SPA mode since there is no server HTTP request (#12948)

  • Add unstable support for splitting route modules in framework mode via future.unstable_splitRouteModules (#11871)

  • Align dev server behavior with static file server behavior when ssr:false is set (#12948)

    • When no prerender config exists, only SSR down to the root HydrateFallback (SPA Mode)
    • When a prerender config exists but the current path is not prerendered, only SSR down to the root HydrateFallback (SPA Fallback)
    • Return a 404 on .data requests to non-pre-rendered paths
  • Improve prefetch performance of CSS side effects in framework mode (#12889)

  • Disable Lazy Route Discovery for all ssr:false apps and not just "SPA Mode" because there is no runtime server to serve the search-param-configured __manifest requests (#12894)

    • We previously only disabled this for "SPA Mode" which is ssr:false and no prerender config but we realized it should apply to all ssr:false apps, including those prerendering multiple pages
    • In those prerender scenarios we would prerender the /__manifest file assuming the static file server would serve it but that makes some unneccesary assumptions about the static file server behaviors
  • Properly handle interrupted manifest requests in lazy route discovery (#12915)

@react-router/[email protected]

Patch Changes

@react-router/[email protected]

Patch Changes

[email protected]

Patch Changes

@react-router/[email protected]

Patch Changes

@react-router/[email protected]

Patch Changes

@react-router/[email protected]

Patch Changes

@react-router/[email protected]

Patch Changes

@react-router/[email protected]

Patch Changes

[email protected]

@brophdawg11 brophdawg11 merged commit c9dea37 into release-next Feb 12, 2025
7 of 8 checks passed
@brophdawg11 brophdawg11 deleted the changeset-release/release-next branch February 12, 2025 16: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.

1 participant