Saleor Dashboard deployment to Vercel / Netlify #2446
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @Horib , have you set 404 custom page? Dashboard uses React Router under the hood to render different pages under different paths, but that's done exclusively in browser (as this path doesn't exist as something routable on a server). In that situation you have to redirect all 404s your server is getting to |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
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):
So you basically rewrite everything in the URL always to
/
which is understandable by the server (index), where also SPA lives.