diff --git a/docs/guide/essentials/history-mode.md b/docs/guide/essentials/history-mode.md index 2b2c50686..35e3a5103 100644 --- a/docs/guide/essentials/history-mode.md +++ b/docs/guide/essentials/history-mode.md @@ -124,6 +124,20 @@ Add this to your `firebase.json`: } ``` +#### Vercel + +Add this to your `vercel.json` (or see other options in the [Vercel SPA Fallback Routing docs](https://vercel.com/docs/configuration#routes/advanced/spa-fallback)): + +``` +{ + "version": 2, + "routes": [ + { "handle": "filesystem" }, + { "src": "/.*", "dest": "/index.html" } + ] +} +``` + ## Caveat There is a caveat to this: Your server will no longer report 404 errors as all not-found paths now serve up your `index.html` file. To get around the issue, you should implement a catch-all route within your Vue app to show a 404 page: