Skip to content

Conversation

markdalgleish
Copy link
Member

@markdalgleish markdalgleish commented Jun 5, 2025

To support Vite 7 (currently in beta), this PR makes the following changes:

  • Adds Vite ^7.0.0 to the peer dep range for @react-router/dev
  • optimizeDeps.entries must now be an array of globs, so we map all paths through tinyglobby's escapePath util when the Vite version is 7+.
  • All vite-node imports are now dynamic to ensure we're loading the ESM build since Vite 7+ is ESM only

In addition, this PR:

  • Includes Vite 7 in our array of Vite major versions in our integration tests
  • Adds a Vite 7 playground

I've also manually tested this via an experimental release in a fresh create-react-router setup.

Copy link

changeset-bot bot commented Jun 5, 2025

🦋 Changeset detected

Latest commit: 86e0435

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/fs-routes Patch
@react-router/remix-routes-option-adapter Patch
create-react-router Patch
react-router Patch
react-router-dom Patch
@react-router/architect Patch
@react-router/cloudflare Patch
@react-router/express Patch
@react-router/node Patch
@react-router/serve 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

@markdalgleish markdalgleish merged commit d424be6 into dev Jun 5, 2025
8 checks passed
@markdalgleish markdalgleish deleted the markdalgleish/vite-7 branch June 5, 2025 23:50
Copy link
Contributor

🤖 Hello there,

We just published version 7.6.3-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!

Copy link
Contributor

🤖 Hello there,

We just published version 7.6.3 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment