In the last post, we discussed some of the bugs associated with the UE – CLI project deployment. However, for React projects, the same problems can occur if the create-react-app scaffolding is used to run the NPM run build and then the build folder is thrown directly to the server. How can I just click to run index.html?
-
The easiest way: I personally recommend this, save a lot of effort —- modify package.json
-
Modify line 45 in the configuration file —-node_modules/react-scripts/config/paths.js
If you want to start your server in a build file on the server side, don’t take it too seriously.
Reference for this article: React server deployment