React 部署

Depolyment Steps

  1. Check Basepath
<BrowserRouter basename="/my-app/"
  1. Build Optimize Project
npm run build in create-react-app project
  1. Server must ALWAYS serve index.html (also for 404 cases)
To ensure that Routing works correctly
  1. Upload Build Artifacts to (static) Server
In /build folder when using create-react-app

部署在firebase中

npm install -g firebase-tools

React 部署_第1张图片

你可能感兴趣的:(ReactProject)