-
Notifications
You must be signed in to change notification settings - Fork 10
feat: add @netlify/vite-plugin-react-router to support React Router 7 #472
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
Conversation
✅ Deploy Preview for remix-serverless ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for remix-edge ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
176717d
to
95339a7
Compare
95339a7
to
5a4d475
Compare
5a4d475
to
c0203ab
Compare
@@ -67,14 +67,12 @@ | |||
"@remix-run/react": "^2.12.0", | |||
"@types/react": "^18.0.27", | |||
"@types/react-dom": "^18.0.10", | |||
"lambda-tester": "^4.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was unused
}, | ||
"peerDependencies": { | ||
"@netlify/functions": "^2.8.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this was ever relevant, or at least it isn't currently
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"tsup": "^8.0.2", | ||
"vite": "^5.1.3" | ||
"vite": "^5.4.11" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to upgrade this to resolve some type issues caused by having multiple versions of vite in the workspace.
@@ -0,0 +1,247 @@ | |||
import { expect, test } from './support/fixtures' | |||
|
|||
test.describe('React Router user journeys', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are almost identical to the Remix e2e tests. We only changed a few strings like "Welcome to Remix", etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Added in #472 but didn't realize there was a config file to update!
* ci(release-please): add new package to config Added in #472 but didn't realize there was a config file to update!
Description
Remix has converged with React Router and the "next version" of Remix was released as React Router 7.
This PR adds a new package to support React Router 7:
@netlify/vite-plugin-react-router
. The naming convention is different as this is purely a Vite plugin (previous "adapters" also supported the Remix Classic Compiler), so we were able to follow the documented naming convention.Future work
@netlify/remix-adapter
. We should probably refactor to extract the shared logic.Related Tickets & Documents
FRB-1511
Supersedes #471
See also netlify/remix-template#157
QA Instructions, Screenshots, Recordings
This PR adds extensive e2e tests.
I also added a new React Router Netlify template here: netlify/react-router-template#1. It uses this new plugin, and you can see the successful deploy preview there.