Example of deploying a Vite + vite-plugin-ssr
app to Vercel.
See vite-plugin-ssr.com/vercel.
To run the example:
-
git clone git@github.com:brillout/vite-plugin-ssr cd vite-plugin-ssr/examples/vercel/
- Create a new Git repository and push it to GitHub/GitLab/...
git init git remote add origin git@github.com:your-username/vite-plugin-ssr_vercel git push origin master -u
- Create a Vercel account, authorize Vercel to access your newly created Git repository, then finally add your Git repository to Vercel.
To deploy (Vercel's Git integration allows us to simply push to deploy):
-
git push
To develop (for increased dev speed we use an Express.js dev server instead of vercel dev
):
-
npm install npm run dev