Vercel
You can use Vercel to deploy a Vite site to their global edge network with zero configuration.
This guide includes instructions for deploying to Vercel through the website UI or Vercel’s CLI.
Project configuration
Section titled “Project configuration”Follow the Vercel adapter guide.
How to deploy
Section titled “How to deploy”You can deploy to Vercel through the website UI or using Vercel’s CLI (command line interface). The process is the same for both static and on-demand rendered Vite sites.
Website UI deployment
Section titled “Website UI deployment”-
Push your code to your online Git repository (GitHub, GitLab, BitBucket).
-
Import your project into Vercel.
-
Vercel will automatically detect Vite and configure the right settings.
-
Your application is deployed! (e.g. vite.vercel.app)
After your project has been imported and deployed, all subsequent pushes to branches will generate Preview Deployments, and all changes made to the Production Branch (commonly “main”) will result in a Production Deployment.
Learn more about Vercel’s Git Integration.
CLI deployment
Section titled “CLI deployment”-
Install the Vercel CLI and run
vercelto deploy.Terminal window npm install -g vercelvercelTerminal window pnpm add -g vercelvercelTerminal window yarn global add vercelvercel -
Vercel will automatically detect Vite and configure the right settings.
-
When asked
Want to override the settings? [y/N], chooseN. -
Your application is deployed! (e.g. vite.vercel.app)
Project config with vercel.json
Section titled “Project config with vercel.json”You can use vercel.json to override the default behavior of Vercel and to configure additional settings. For example, you may wish to attach headers to HTTP responses from your Deployments.
Learn more about Vercel’s project configuration.