I have set up a React project with webpack.I want to upload this project on my user site on Github. I created the user site repository with 2 branches- master and gh-pages. The project structure is as follows:
The Package.json file has the following commands for build and deployment.
"start":"webpack-dev-server --open --mode development --content-base ./dist","test":"npm run lint && npm run security-check && npm run bundle","predeploy":"npm run build","deploy":"gh-pages -d dist"
In dev mode, the project is working fine.The HtmlWebPackPlugin is inserting the bundle js script tag in the dist/index.html. For deploying to gh-pages, when I run the deploy command, the code is updated correctly in the branch gh-pages. I can see the latest dist folder files in there.
But the user site is giving me 404: not found error for bundle.js.