Skip to content

Saleor Dashboard deployment to Vercel / Netlify #2446

Answered by andrzejewsky
Horib asked this question in Q&A
Discussion options

You must be logged in to vote

I think it's because vercel doesn't know that you have an SPA app. In the SPA we need to tell the server that all traffic must go to the index of the app. It's the same for any reverse-proxy / web-servers, otherwise, a web-server will try to match based on the filesystem.

Here is more info https://vercel.com/docs/project-configuration#project/rewrites I think for you will work (vercel.json):

{
  "rewrites":  [
    {"source": "/(.*)", "destination": "/"}
  ]
}

So you basically rewrite everything in the URL always to / which is understandable by the server (index), where also SPA lives.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Horib
Comment options

Answer selected by Horib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants