Skip to content

React hosting

React hosting.

Deploy a React app built with Vite or Create React App. Lahyer runs your build, serves the files from a global edge with HTTPS and sends unknown paths to index.html, so client-side routing keeps working.

Deploy your project
StaticNo server to keep awake
SPA routingUnknown paths serve index.html
PreviewsA URL for every pull request

What Lahyer does with it

How React builds and runs.

Lahyer fills these in from your repository. Change anything that does not fit in the project's build settings.

How Lahyer builds and runs React
Detected fromvite or react-scripts in your package.json dependencies
Installnpm, pnpm, Yarn or Bun, chosen from your packageManager field or lockfile
BuildYour build script, or vite build or react-scripts build
Outputdist/ for Vite, build/ for Create React App
RoutingPaths without a file fall back to index.html for React Router and similar

React documentation

Your first deploy

Three steps
to a live URL.

Connect the repository.

Import it from GitHub or GitLab, or deploy a local folder with the Lahyer CLI.

Set build-time variables.

Vite reads VITE_ variables while it builds, and Lahyer passes your environment variables to the build. Anything in browser code is public, so keep secrets out of it.

Push and ship.

Every push deploys to your live URL, and every pull request gets a preview to review before you merge.

A few useful answers

Before you begin.

Does client-side routing work after a refresh?

Yes. For Vite and Create React App builds, a path with no matching file serves index.html, so React Router and similar routers take over.

Can I deploy a Vite app that uses Vue, Svelte or Preact?

Yes. Lahyer builds any Vite project as static files from dist/. SvelteKit, Nuxt and Astro have their own guides.

Will a static React app sleep on the free plan?

No. Static files are served without a running server, so there is no cold start on any plan.

Can I build a React app with AI instead?

Yes. Studio's website template builds a Vite + React app from a description. Publish it on Lahyer or export the code to GitHub or GitLab.