React & static SPAs

Deploy Vite, CRA-style, or similar frontends that compile to static assets (runtime_kind: react_static).

What gets deployed

erfa3ly runs your install and build commands in an isolated build environment, then publishes the contents of your configured output directory as static files behind the edge network—no Node server at runtime.

Typical settings

  • Install: npm install, pnpm install, or yarn—match your repo
  • Build: npm run build (or your framework script)
  • Output directory: often dist (Vite) or build—must match your tool
  • Node version: align with your local CI (for example 20 LTS)
Using React Router or another client router? Ensure basename / asset paths match how the site is served on your hostname.

Example package.json scripts

package.json
{
"scripts": {
"build": "vite build",
"preview": "vite preview"
}
}

See also