-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: replace _redirects workaround with preferStatic #133
Conversation
✅ Deploy Preview for remix-edge-on ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for remix-on ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Oh hey, there's deploy previews for this site - neat! Looks like it's working alright :D |
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.
What happens in the scenario where the user runs ntl build
and then ntl dev
? Wouldn't the generated function take precedence over the dev server?
We've started deleting |
I've not tested this, but approving on the basis that you've tested the template in dev locally |
It's important that the SSR function matches all paths, except for the ones that have static files. In the past,
_redirects
was the way to achieve that - but with V2 Functions, in-source-config is much easier to reason about. Now that we havepreferStatic
, we can scratch the_redirects
workaround and use in-source-config instead!Keeping this as draft until i've manually verified that it works as intended. One of the challenges is that the Remix compiler will turn
true
into!0
, but netlify/zip-it-and-ship-it#1665 should help us handle that.