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