Deplomo
Sign in
React deployment guide

Deploy react and Vite on Deplomo

Deploy React and Vite on Deplomo from Git or the CLI. Build automatically, configure environment variables, a domain, and SSL for dashboards and single-page apps. Deploy your React project.

Short answer

fordeploy react Vite projects build JavaScript on the cloud platform, and pages are cached on fast disks. To compare other frameworks, see the React hosting Guide Deploy nextjs and page Deployment guide .

Last reviewed:6 September 2026

Prepare your project for deploy react

Add the project dependency files, package.json and lockfile to your Git repository. Default build and run commands for this stack:

# Build command
npm ci && npm run build

# Run command
npx serve -s dist -l $PORT

Vite variables are read at build time and usually have the VITE_ prefix.

Automatic deployment directly from the Git repository

  1. Create a new project and environment in the Deplomo user panel.
  2. Connect the service to the GitHub or GitLab repository and the desired branch.
  3. Set the build and run commands to match your project.
  4. Set the required environment variables, then deploy.
  5. Connect your custom domain in the Domains section and use free SSL.

Deploy a local folder with Deplomo CLI

curl -fsSL https://get.deplomo.com/install.sh | sh
deplomo login
cd your-project
deplomo deploy
deplomo logs

Use the Deplomo CLI to deploy local code directly without pushing it to Git.

On Windows (PowerShell), use irm https://get.deplomo.com/install.ps1 | iex instead of the first command.

Production tips for React

  • Configure SPA routes to fall back to index.html.
  • Keep secret keys out of the browser bundle.
  • Deploy the API as a separate service and restrict CORS.
  • Check the health check and startup time before routing live traffic.
  • Store persistent data and user files on persistent disks or cloud storage.

Frequently asked questions

How do I deploy a React app to cloud hosting?

Build the React project with a tool such as Vite or Webpack, then publish the dist output on the cloud platform with a web server and caching.

How do I deploy a React project with single-page app routes?

Fallback routing is enabled for React deployments so refreshing a page does not return a 404 error.