Skip to content
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

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

Skn0tt
Copy link
Contributor

@Skn0tt Skn0tt commented Nov 29, 2023

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 have preferStatic, 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.

@Skn0tt Skn0tt requested a review from a team as a code owner November 29, 2023 13:53
Copy link

netlify bot commented Nov 29, 2023

Deploy Preview for remix-edge-on ready!

Name Link
🔨 Latest commit 34cdb85
🔍 Latest deploy log https://app.netlify.com/sites/remix-edge-on/deploys/65674442798bd20008b09356
😎 Deploy Preview https://deploy-preview-133--remix-edge-on.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Skn0tt Skn0tt marked this pull request as draft November 29, 2023 13:53
Copy link

netlify bot commented Nov 29, 2023

Deploy Preview for remix-on ready!

Name Link
🔨 Latest commit 34cdb85
🔍 Latest deploy log https://app.netlify.com/sites/remix-on/deploys/656744423c1fdc00084e6ff5
😎 Deploy Preview https://deploy-preview-133--remix-on.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Skn0tt Skn0tt self-assigned this Nov 29, 2023
@github-actions github-actions bot added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Nov 29, 2023
@Skn0tt
Copy link
Contributor Author

Skn0tt commented Nov 29, 2023

Oh hey, there's deploy previews for this site - neat! Looks like it's working alright :D

@Skn0tt Skn0tt marked this pull request as ready for review November 29, 2023 14:23
@Skn0tt Skn0tt requested a review from ascorbic November 29, 2023 14:23
Copy link
Contributor

@ascorbic ascorbic left a 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?

@Skn0tt
Copy link
Contributor Author

Skn0tt commented Dec 14, 2023

We've started deleting .netlify/functions-internal on startup of netlify dev - so no, that won't happen!

@ascorbic
Copy link
Contributor

I've not tested this, but approving on the basis that you've tested the template in dev locally

@Skn0tt Skn0tt merged commit a5ca447 into main Dec 14, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants