-
Notifications
You must be signed in to change notification settings - Fork 184
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
Vercel support #232
Comments
Also having this issue, I've tried to do a similar fix which worked for react routing here: https://stackoverflow.com/questions/64815012/why-does-react-router-not-works-at-vercel e.g.
|
I copy pasted that vercel.json @Joshswooft mentioned into my svelte SPA app hosted on Vercel and that did the trick for me! I wish this info was in a doc somewhere. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a way I can integrate this with Vercel? I don't want to use SvelteKit as the website I want to publish onto Vercel is static and quite literally doesn't have a backend. I use the Svelte + Vite template, with JavaScript. Running the site locally via
npm run dev
works fine, and the site is fully functional, but Vercel doesn't allow me to use any form of routing; I get a 404 page on any subdirectory that would typically run perfectly fine locally.i.e.,
app.vercel.app
works perfectly fine, butapp.vercel.app/{something}
results in a 404. I use anchor tags in my HTML for redirects, and I use theRouter
component inApp.svelte
The text was updated successfully, but these errors were encountered: