This is a common issue with SPAs which occurs while working with child paths/routes. This is not specific to vercel and even occurs on other platforms as well, Here is something you can try with vercel:

Create a vercel.json file within the root folder of your project. Add this config to the file:

{
  "rewrites": [
    { "source": "/(.*)", "destination": "/" }
  ]
}

As mentioned in this doc as well:

"rewrites" specifies the rules for URL rewrites. { "source": "/(.*)", "destination": "/" } tells Vercel that for any URL path that matches /(.*) (essentially any path), redirect the request to the root path (/).

Answer from Chinz on Stack Overflow
🌐
Vercel
vercel.com › templates › react › vite-react
Vite - React
This directory is a brief example of a Vite/React site that can be deployed to Vercel with zero configuration.
🌐
GitHub
github.com › daniel-nagy › vercel-react-vite-template
GitHub - daniel-nagy/vercel-react-vite-template: A React template for Vercel using Typescript and Vite. · GitHub
A React template for Vercel using Typescript and Vite. - daniel-nagy/vercel-react-vite-template
Forked by 2 users
Languages   TypeScript 89.2% | JavaScript 6.1% | HTML 4.7%
Discussions

reactjs - Why i'm not able to deploy my vite app on vercel - Stack Overflow
Im trying to build a social media app using Vite but the main problem is its not getting deployed anyhow. Im adding my vite.config.js file for better understading. The main problem im facing is the... More on stackoverflow.com
🌐 stackoverflow.com
express - How to deploy a Vite + React SSR application on Vercel? - Stack Overflow
I am trying to deploy a Vite app on vercel which is using express to do SSR. The express server runs successfully, vercel however doesn't deploy the built files (dist/server and dist/client, see th... More on stackoverflow.com
🌐 stackoverflow.com
Can I host a React + Vite + TypeScript project on Vercel’s free plan? Also looking for a free backend option
I’d host everything on Railway, TBH. Super duper simple stuff. More on reddit.com
🌐 r/reactjs
10
11
October 13, 2025
React app i created using vite has refused to deploy despite it working fine on local host and run build
Check index.html for correct script path: · If issues persist, could you share your project structure, package.json, and full Vercel error logs? Thank you for your patience · This topic was automatically closed 30 days after the last reply. More on community.vercel.com
🌐 community.vercel.com
0
0
October 23, 2024
🌐
Build with Matija
buildwithmatija.com › blog › how-to-deploy-a-vite-react-app-on-vercel-and-connect-to-an-external-api-server
How to Deploy a Vite-React App on Vercel and Connect to an External API Server | Build with Matija
November 15, 2024 - Comprehensive React guides covering hooks, performance optimization, and React 19 features. Includes code examples and prompts to boost your workflow. When you build and deploy a Vite-powered app on Vercel, the Vite development server stops running.
🌐
GitHub
github.com › internetdrew › vite-express-vercel
GitHub - internetdrew/vite-express-vercel-starter: A starter template for building and deploying a Vite + React + Express application on Vercel, with details on configs to power your project. · GitHub
import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; // https://vite.dev/config/ export default defineConfig({ plugins: [react()], server: { proxy: { '/api': { target: `http://localhost:3000`, changeOrigin: true, }, }, }, }); This is located in vercel.json for configuring Vercel deployment settings.
Starred by 16 users
Forked by 6 users
Languages   TypeScript 38.7% | CSS 37.8% | JavaScript 15.7% | HTML 7.8%
🌐
Stack Overflow
stackoverflow.com › questions › 78098996 › how-to-deploy-a-vite-react-ssr-application-on-vercel
express - How to deploy a Vite + React SSR application on Vercel? - Stack Overflow
The express server runs successfully, vercel however doesn't deploy the built files (dist/server and dist/client, see the Vite SSR Guide)
Find elsewhere
🌐
Roblog
robiul.dev › deploy-vite-react-app-on-both-github-pages-and-vercel
Deploy Vite React App on Both GitHub Pages and Vercel
November 20, 2023 - You can name it anything, but ensure it starts with VITE_ the preset. Leave other settings as default and click "Deploy." Your React application will deploy within seconds, providing two to three preview links. Even though we've completed the deployment process on Vercel, there's one more thing to address.
🌐
Vercel
vercel.com › vercel documentation › supported frameworks › frontends › react router
React Router on Vercel
4 weeks ago - import { Analytics } from '@vercel/analytics/react'; export default function App() { return ( <html lang="en"> <body> <Analytics /> </body> </html> ); } ... import { reactRouter } from '@react-router/dev/vite'; import tailwindcss from '@tailwindcss/vite'; import { defineConfig } from 'vite'; import tsconfigPaths from 'vite-tsconfig-paths'; export default defineConfig(({ isSsrBuild }) => ({ build: { rollupOptions: isSsrBuild ?
🌐
Reddit
reddit.com › r/reactjs › can i host a react + vite + typescript project on vercel’s free plan? also looking for a free backend option
r/reactjs on Reddit: Can I host a React + Vite + TypeScript project on Vercel’s free plan? Also looking for a free backend option
October 13, 2025 -

Hi everyone 👋,

I have a frontend project built with React + Vite + TypeScript, and I’d like to host it on Vercel.Does Vercel support deploying this kind of setup on the free plan?

If yes, what are the main limitations (like build time, bandwidth, or request limits)?

If not, what are the best free alternatives for hosting Vite projects — such as Netlify, GitHub Pages, or Cloudflare Pages — and do they require any special configuration for Vite?

Additionally, I need a free backend to pair with my frontend.

What are the recommended free backend options that work well with Vercel or Vite projects?

For example:

•	Using Serverless Functions on Vercel

•	Hosting Express.js on Render or Railway

•	Or using a BaaS solution like Supabase or Firebase

Any advice or experience would be greatly appreciated 🙏

🌐
Vercel
vercel.com › templates › vue › vite-vue
Vite - Vue
This directory is a brief example of a Vite/Vue.js site that can be deployed to Vercel with zero configuration. While this project uses Vue.js, Vite supports many popular JS frameworks. ... A client-side React app created with create-react-app.
🌐
Vercel Community
community.vercel.com › help
React app i created using vite has refused to deploy despite it working fine on local host and run build - Help - Vercel Community
October 23, 2024 - Check index.html for correct script path: <script type="module" src="/src/main.jsx"></script> · If issues persist, could you share your project structure, package.json, and full Vercel error logs? Thank you for your patience · This topic was automatically closed 30 days after the last reply.
🌐
Reddit
reddit.com › r/backend › how to deploy a react + vite + typescript project on vercel (free plan) — any setup tips?
r/Backend on Reddit: How to deploy a React + Vite + TypeScript project on Vercel (free plan) — any setup tips?
October 13, 2025 -

Hey everyone 👋

I’m currently working on a frontend project built with React + Vite + TypeScript.

I’ve read the Vercel docs and noticed that Vercel mainly focuses on Next.js, but I’m wondering if there’s an official or recommended way to deploy Vite-based projects there, especially on the free plan.

Here’s what I’ve tried so far:

•	Built the project using npm run build — everything works fine.

•	The output is in the /dist folder (default for Vite).

•	I saw some mentions that it’s possible to host it on Vercel with static export, but I’m not sure about the right configuration for routing and environment variables.

My questions:

1.	Does Vercel free plan fully support React + Vite projects?

2.	Are there any limitations (build time, bandwidth, or file size)?

3.	If Vercel isn’t ideal, what’s the best free alternative (Netlify, GitHub Pages, Cloudflare Pages, etc.) for Vite apps?

4.	Also, I’ll need a simple free backend — would you recommend something like Render, Railway, or Supabase for small APIs?

Thanks in advance! 🙏 I’d really appreciate any guidance or setup examples.

🌐
DEV Community
dev.to › ngduc › try-react-18-with-vite-typescript-and-vercel-okg
Try React 18 with Vite, Typescript and Vercel - DEV Community
October 20, 2023 - This tutorial will demonstrate a step-by-step guide to create your project using React 18 alpha, Typescript, Vite and deploy it to Vercel (freemium).
🌐
Vercel Community
community.vercel.com › help
React Router and Vite App: 404 Error for Routes on Vercel Deployment - Help - Vercel Community
December 8, 2024 - I’m deploying a React application built with Vite and using React Router for client-side routing. While the app works perfectly in development, I’m encountering issues when trying to access routes directly after deployme…
🌐
Stack Overflow
stackoverflow.com › questions › 72001670 › how-to-deploy-react-typescript-app-to-vercel-with-vite
reactjs - How to deploy React TypeScript app to Vercel with Vite - Stack Overflow
October 7, 2025 - However, Vercel doesn't install devDependencies during build time like Heroku does, so it doesn't know what "vite build" is (same for tsc).
🌐
Gautham Dev Diaries
gautham10.hashnode.dev › react-vite-app-a-comprehensive-guide-from-creation-to-vercel-deployment
React Vite App: A Comprehensive Guide from Creation to Vercel Deployment
February 3, 2024 - In this article, we will embark on a journey to explore the creation and deployment of a React Vite app, comparing it with the widely used Create React App. Additionally, we'll leverage the power of Vercel to host our lightning-fast React application seamlessly.
🌐
GitHub
github.com › ivolimasilva › react-vite › blob › main › vercel.json
react-vite/vercel.json at main · ivolimasilva/react-vite
Demo React application using Vite. Contribute to ivolimasilva/react-vite development by creating an account on GitHub.
Author   ivolimasilva
🌐
Vercel Community
community.vercel.com › help
Vite React App white screen on Vercel deploy - Help - Vercel Community
August 5, 2024 - I am getting a white screen on deployment. A local Vite build and preview works fine and so does my Gitlab pages. I am seeing a js and css file 404 in the network tab (e.g. https://commercial-cleaning-kappa.vercel.app/…
🌐
Kitemetric
kitemetric.com › blogs › deploying-your-vite-and-react-app-to-production
Deploying Vite & React Apps: Netlify, Vercel, DigitalOcean | Kite Metric
Netlify uses npm run build to build your Vite project. Ensure the output directory is set correctly. ... Click the deploy button. Your site will be live shortly. Vercel offers a fast and efficient platform for hosting React applications.