Deploy a Vite app on Nept
This guide covers deploying any Vite project — React, Vue, Svelte, Solid, or Preact — to Nept.
Prerequisites
- A Nept account.
- A Vite project with a
buildscript inpackage.json.
Option A: Deploy from GitHub
- Connect GitHub.
- Click New project and choose your Vite repository.
- Nept sets the build command to
vite buildand the output directory todist. - Add environment variables. Variables exposed to the browser must be prefixed with
VITE_. - Click Deploy.
Option B: Deploy with the CLI
terminal
npm install -g nept-cli
nept login
cd my-vite-app
nept deploy --prod
Configuration
Vite outputs static assets by default, which Nept serves globally. If your app needs a backend (API routes, server functions, or a database), pair it with:
- A managed database
- A separate backend deployed via Docker
Environment variables
Variables that must reach the browser must start with VITE_:
terminal
nept env add VITE_API_URL https://api.example.com --target production
Server-side or build-time-only variables do not need the prefix. See Environment Variables.
Custom domains
See Custom Domains.