📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials React Modern Development Deploying React Apps

Deploying React Apps

5 min read
Build with npm run build and deploy the dist/ folder to Vercel, Netlify, or a static host. Configure your server to serve index.html for all routes so React Router works correctly for direct URL access.

Deploying React

Build

npm run build  # creates dist/ folder

Vercel (easiest)

npm i -g vercel
vercel  # follow prompts

Netlify

npm i -g netlify-cli
netlify deploy --prod --dir=dist

Nginx

server {
  root /var/www/myapp/dist;
  try_files $uri $uri/ /index.html;
}