-
Notifications
You must be signed in to change notification settings - Fork 533
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
netlify_builder preset not working as expected (Netlify returning 405) #2946
Comments
Thanks @pi0 this worked exactly as we wanted, speed is now 500ms -> 50ms also API endpoints work as they should! But if I understand correctly then |
Yes we should do it from docs at least 👍🏼 |
Do I close the issue or do you need it for docs? |
Yes we can drop it in v3 for sure. For v2, removing preset would be a breaking change but i suggest use docs + a preset level warning to make people moving away from it. (if you have time to make a PR i would appreciate 🙏 |
Environment
When building on Netlify:
node: 20.x
nitro: 2.10.4
Reproduction
https://stackblitz.com/edit/github-dlgsurlp-kv8uscif?file=server%2Froutes%2Findex.ts,server%2Fapi%2Ftest.post.ts
Github repo:
https://github.com/EngageFactory/nitro-swr-test
Describe the bug
When building on Netlify with
netlify_builder
preset ignores the swr settingworks in stackblitz but not on Netlify. It should build the api routes with normal netlify preset (understanding from nuxt/nuxt#19774 (comment)), otherwise netlify accepts GET only (https://docs.netlify.com/configure-builds/on-demand-builders/).
Netlify returns 405 method not allowed
Posting here as adviced by @danielroe on nuxt/nuxt#19774 where similar problem is being addressed.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: