-
Notifications
You must be signed in to change notification settings - Fork 10
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
[draft] react-router 7 support #471
Conversation
❌ Deploy Preview for remix-serverless failed. Why did it fail? →
|
✅ Deploy Preview for remix-edge ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Copyright (c) Remix Software Inc. 2020-2021 | ||
Copyright (c) Shopify Inc. 2022-2023 | ||
Copyright (c) Netlify Inc. 2023 |
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.
- Update License messaging
<!-- TODO update this with react router template --> | ||
<!-- It is strongly advised to use [the Netlify Remix template](https://github.com/netlify/remix-template) to create a Remix | ||
site for deployment to Netlify. See [Remix on Netlify](https://docs.netlify.com/frameworks/remix/) for more details and | ||
other options. --> |
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.
- Update with reference to react router template
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/netlify/remix-compute", |
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.
- Decide if we're keeping the react-router adapter in this repository
// We need to add an extra SSR entrypoint, as we need to compile | ||
// the server entrypoint too. This is because it uses virtual | ||
// modules. | ||
// NOTE: the below is making various assumptions about the React Router Vite plugin's | ||
// implementation details: | ||
// https://github.com/remix-run/remix/blob/cc65962b1a96d1e134336aa9620ef1dad7c5efb1/packages/remix-dev/vite/plugin.ts#L1149-L1168 | ||
// TODO(serhalp) Stop making these assumptions or assert them explictly. | ||
// TODO(serhalp) Unless I'm misunderstanding something, we should only need to *replace* | ||
// the default React Router Vite SSR entrypoint, not add an additional one. |
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.
- We should try to simplify this comment if possible (also applies to the remix-adapter as this was copied over)
const start = Date.now() | ||
console.log(`[${request.method}] ${request.url}`) | ||
try { | ||
const mergedLoadContext = (await getLoadContext?.(request, netlifyContext)) || netlifyContext |
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.
@serhalp - I renamed this to mergedLoadContext
, is that reasonable?
@@ -0,0 +1,66 @@ | |||
# Changelog |
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.
- Clear runtime changelog
@@ -0,0 +1,11 @@ | |||
# Remix Server Runtime for Netlify |
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.
- Remix in runtime readme
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/netlify/remix-compute.git" |
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.
- Are we keeping the runtime in the remix-compute repository? (repeat)
Replaced by #472 |
Description
Tested https://github.com/remix-run/react-router-templates/tree/main/default with
ntl dev
+ntl serve
+ntl deploy
and they all seem to work well. Edge was not tested.Notes:
react-router-adapter
but this is meant to serve as a starting point for usvite.Plugin
typereact-router-runtime
as I've done here, however it is worth noting that the following variables are not currently exported from@react-router/server-runtime
broadcastDevReady
logDevReady
UNSAFE_SingleFetchRedirectSymbol
UNSAFE_SingleFetchResults
UNSAFE_SingleFetchResult
react-router-adapter
to its own repository, or keep it here for the time being?TODO:
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
Please replace this line with instructions on how to test your changes
For us to review and ship your PR efficiently, please perform the following steps:
ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a
typo or something that`s on fire 🔥 (e.g. incident related), you can skip this step.
guide and passes our tests.
A picture of a cute animal (not mandatory, but encouraged)