- How to use GitHub Pages with React
- https://web-begginer-log.com/create-react-app-gh-pages/
In the package.json
file, add the following:
{
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
},
"homepage": "./"
}
-
This is necessary to add.
-
If you want to achieve an SPA-like behavior: