From 1c4b4816e606567b2bb70198e4e626c8bbdbb4d2 Mon Sep 17 00:00:00 2001 From: Sejal Mukane Date: Sun, 8 Feb 2026 15:26:20 +0530 Subject: [PATCH] docs: add free SPA hosting info for Cloudflare and Azure --- docs/deploy.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/deploy.md b/docs/deploy.md index 573d396e7..19155357b 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -92,6 +92,35 @@ When using the HTML5 router, you need to set up redirect rules that redirect all /* /index.html 200 ``` +## Cloudflare Pages + +Cloudflare Pages provides free static hosting with built-in support for +single-page applications. + +If you are using `routerMode: 'history'`, ensure that all routes fall back to +`index.html`. + +Cloudflare Pages automatically handles SPA routing when deploying a static +site, so no additional rewrite rules are usually required. + + +## Azure Static Web Apps + +Azure Static Web Apps offers free static site hosting with support for SPAs. + +When using `routerMode: 'history'`, configure a navigation fallback so that +all routes are served by `index.html`. + +Example `staticwebapp.config.json`: + +```json +{ + "navigationFallback": { + "rewrite": "/index.html" + } +} +``` + ## Vercel 1. Install [Vercel CLI](https://vercel.com/download), `npm i -g vercel`