Skip to content

Fail prerendering if a page is shadowed by an endpoint #3410

Closed
patooworld/kit
#3
@alexbjorlig

Description

@alexbjorlig

Describe the bug

If you create a bob/index with a POST and bob/index.svelte --> posting will not work when deployed to Vercel.

Vercel throws error 405.

Reproduction

Deploy this repo to Vercel, and visit /bob and hit the submit button - and then the error will appear.

As long as it exists 😅, you can also try it here: https://sveltekit-p9hxntt45-jeddah.vercel.app/bob

Logs

No response

System Info

Latest version `next` of kit and vercel adapter.

Severity

serious, but I can work around it

Additional Information

I can simply work around by not enabling prerender=true on the sveltekit component.

Screen Shot 2022-01-19 at 12 53 36

Let me know if you need more information 😎

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedPRs welcomed. The implementation details are unlikely to cause debatep2-nice-to-haveSvelteKit cannot be used by a small number of people, quality of life improvements, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions