The page is empty after react is packaged.

put the build folder on the server after the react project npm run build, and the page is empty

clipboard.png

package.json"homepage":"./",

clipboard.png

could you tell me what went wrong?

Nov.26,2021

first of all, you need to make sure that you can access locally


. The BrowserRouter, used for routing needs to be reconfigured by the server. If you change it to HashRouter, you do not need to change the configuration to the server

.
Menu