Netlify
Easy Static Deployments to Netlify
Install and authorise netlify-cli
brew install netlify-cli
netlify login
If your app uses React Router, create a
netlify.toml
file in the root of your app and paste this in
[[redirects]]
from="/*"
to="/"
status=200
Compile a production build of your app
npm run build
Test your production build locally (optional)
npm run preview
Deploy the production build
netlify deploy --prod --dir dist
Compile and deploy if compile succeeds:
npm run build && netlify deploy --prod --dir dist
Other Options
Last updated
Was this helpful?