Deploying React, Vite & Static Sites
Single Page Applications (SPAs) and static site generators—including Vite, React, Vue, Svelte, Astro, and HTML5—are served directly from Exovon's Anycast Edge CDN. Benefit from zero server maintenance, zero cold boots, and low time-to-first-byte (TTFB).
Fast-Path Promotion
Static sites bypass container compilation. Assets sync to edge object storage and promote to live traffic in under 1 second.
Automated SPA Fallback
Unmatched client routes rewrite automatically to index.html, preventing 404 errors on React Router page refreshes.
Immutable Edge Caching
Content-hashed JavaScript and CSS assets are served with immutable cache-control headers for immediate repeat loads.
1. Configure Your Build Scripts
Ensure your package.json contains a build script targeting an output directory (typically dist or build):
{
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
}
}dist, Create React App to build, Astro to dist, and Next.js static exports to out.2. Client Environment Variables
Because static applications execute entirely in the user's browser, environment variables are embedded into bundle code during build time. Prefix variables according to your framework:
| Framework | Required Prefix | Code Access Example |
|---|---|---|
| Vite (React / Vue) | VITE_* | import.meta.env.VITE_API_URL |
| Create React App | REACT_APP_* | process.env.REACT_APP_API_URL |
| Astro | PUBLIC_* | import.meta.env.PUBLIC_API_URL |
3. Deploy via CLI
Deploy your pre-built static directory or dispatch an automated build runner:
# 1. Link your local project
npx exovon link --project "my-vite-app"
# 2. Build locally and deploy the output directory to Edge CDN:
npm run build
npx exovon deploy --static --output-dir dist
# Or deploy source directly and build on the Mumbai worker:
npx exovon deploy --framework vite4. Single Page Application Routing
When a visitor navigates directly to a deep route (such as /dashboard/settings) or refreshes the page, the Exovon Edge Router checks for physical static file matches first. If no asset file matches, it serves index.html with an HTTP 200 status, allowing client-side routers to render the requested view seamlessly.
5. Asset Limits & Fair Use Policy
To guarantee sub-second edge distribution across global CDN nodes, static deployments enforce the following boundary thresholds during the build phase:
| Threshold | Free Plan | Paid Plans (Starter / Pro / Heavy) |
|---|---|---|
| Max Single Static Asset | 25 MB | 50 MB |
| Max Static Files Count | 5,000 files | 25,000 files |
| Max Total Uncompressed Size | 100 MB | 5,000 MB (5 GB) |
| Prohibited Asset Formats | Direct video streaming (.mp4, .m3u8, .webm), raw audio archives, and large binaries (.zip, .exe). | |
Frequently Asked Questions
How do I invalidate the edge CDN cache after a deployment?
Exovon purges edge cache references automatically during deployment promotion. Because bundlers use content hashes in asset filenames, browsers download new assets immediately without cache collision.
Is static website hosting free, and are there bandwidth limits?
Yes, static website hosting is ₹0 Free with unmetered Edge CDN distribution under our Fair Use Policy. Bandwidth is intended for web assets (HTML, CSS, JS, web fonts, images <= 25MB on Free, 50MB on Paid). Video streaming and bulk file storage dumps are prohibited.