Vite SPA and Create React App
Deploy Vite or Create React App client builds with automatic SPA routing.
Nitroship manages Vite client applications, including React, Vue, and Svelte, and legacy Create React App builds. No server or compute region is needed.
Detection and build output
| Preset slug | Detection | Output |
|---|---|---|
vite | vite in package.json | dist |
create-react-app | react-scripts dependency | build |
Keep a build script (vite build or react-scripts build). For Vite, the output must contain index.html. A single-page build gets an automatic fallback to /index.html when a URL does not match a file, so nested client routes survive a refresh. Multi-page Vite builds do not get this catch-all; their page files are served normally.
Literal Vite root/outDir settings and supported CLI output arguments are honored. You can also set build.outputDirectory to select a custom output folder. Library builds are not deployable pages. To select Create React App explicitly, replace vite below with create-react-app.
Deploy
Install the CLI
curl -fsSL https://nitroship.co/install.sh | bash
ntro loginAlready installed? Skip ahead. Full options, PATH setup, and updates: Install the CLI.
{
"build": {"framework": "vite"}
}Setting build.framework skips detection and uses this preset, even if your project root has a Dockerfile. It can't be combined with build.dockerfile. Without it, Nitroship detects the build as described in How Nitroship chooses a build.
ntro apps create my-vite-app
ntro deploy . --prodAfter installing dependencies, you can also build locally with ntro deploy . --prod --local. After deployment, open static assets and nested routes at the URL printed by the CLI.
Limits and custom setups
Static deployments need no compute region and do not run SSR, server APIs, or server middleware. Never put secrets in browser-visible configuration. See Environment variables for build-time settings and Static sites for routing.
For adapters or output layouts outside this contract, use your own Dockerfile. Remove build.framework and define installation, build, and startup in the Dockerfile.