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

Cloudflare Pages: Don’t overwrite _routes.json if present in the public folder #1291

Closed
1 task done
AWBroch opened this issue Jun 7, 2023 · 0 comments · Fixed by #1312
Closed
1 task done

Cloudflare Pages: Don’t overwrite _routes.json if present in the public folder #1291

AWBroch opened this issue Jun 7, 2023 · 0 comments · Fixed by #1312
Labels
enhancement New feature or request preset:cloudflare

Comments

@AWBroch
Copy link
Contributor

AWBroch commented Jun 7, 2023

Describe the feature

Auto-generating a _routes.json file for Cloudflare Pages is great, but there are some cases where it makes sense to just manually write a _routes.json
For example, if you have more than 100 static routes, or if an API path that is available during pre-rendering isn’t available on the server (for example, IPX/nuxt image)
Before #965 I could just put a _routes.json in my public folder and it would be copied and deployed, but after #965 it would overwrite my manual _routes.json with the auto-generated one. So, it would be nice if Nitro didn’t overwrite manual _routes.json files.
I’ve prepared a fix that passes all the tests and I can open a PR if this sounds good.

Additional information

  • Would you be willing to help implement this feature?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request preset:cloudflare
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants