Vite and React Hosting for Static Apps
A public Vite and React app deploys as static files. ohmyho.st builds it, serves the output behind Cloudflare's network, and sends any path that matches no file to index.html with HTTP 200, so a reload on a client-side route works. If the app needs server code, a same-origin API companion covers it.
Start with 200 Free credits. Paid costs $10 a month before tax and adds 1,000 credits per paid period. See pricing.
Read the Vite guide in the docs · Open the example repository
What we checked, and what we did not
The public example is a Vite 8 and React 19 page with a counter and a path display.
| Check | Result | Where to see it |
|---|---|---|
| Local production build | Built to dist/ with one HTML file and one script |
pnpm run build in the folder |
ohmyhost init --root vite-react --dry-run --json |
Status analyzed, framework vite, version admitted, no blockers, runtime static |
Same command, offline, no sign-in |
| A hosted build and live URL | Not done for this example. The inspection says the real build runs only on ohmyho.st | No live URL is claimed |
How to host a Vite and React app
- Inspect it. Run
ohmyhost init --dry-run --jsonin the project. For a repository that holds several apps, add--rootwith the app folder. - Pin the package manager and commit its lockfile. Vite must be at least 5.4.6; the version your lockfile resolves is the one that counts.
- Keep
baseunset or/invite.config. - Build in Dev, open the preview, click through the app and reload a nested route directly.
- Publish the tested version to Production and connect your domain.
Paste this into the coding agent working on your repository:
Read https://ohmyho.st/llms.txt and the get-started Skill. Deploy this Vite application using its existing project and source connection. Inspect the repository, resolve deployment blockers, build and verify Dev including a direct reload of a nested route, then publish the tested artifact to Production.
When the app needs a server
Inspection returns the companion contract for your app. Implement the same-origin /api/* routes the browser calls, and keep private values in runtime secrets. VITE_ variables are public build-time values and must never hold a private credential. Scheduled work is declared in ohmyhost.yaml and runs from the companion.
Limits
From the Vite documentation, read on October 27, 2026:
- No inline code. Vite pages permit no inline script or style code. External resources need declared browser origins.
- Keep
baseat/. A non-root base is not supported. - Router packages do not make it a server app. React, TanStack Router and TanStack Query can be part of a Vite frontend without turning it into TanStack Start.
- Not-found pages are yours. Unknown paths answer
index.html, so render the not-found view in your client router. - A clean inspection is not a build. It cannot prove the hosted build succeeds, or that your login and data work from the new host.
Vite and React hosting questions
Do I need a server for client-side routing?
No. Unknown paths already return index.html.
Can I move a Lovable app here?
Yes, if it is a React and Vite app. The checklist is in Lovable app after export, and the short deployment path is Deploy your exported Lovable app.
Does the example run live somewhere?
No. We have not deployed it to a hosted project, so this page links no live URL for it.
Is Vite free to use?
Yes. Vite is open source under the MIT license.
Deploy a Vite app on ohmyho.st · Other frameworks: Astro · Next.js · TanStack Start