Answer the question
In order to leave comments, you need to log in
How to change the route rules of a single page React app to deploy to gh-pages?
I have a working single page application in react. It is required to transfer this application to gh-pages. For gh-pages, the application root looks like this https://name.github.io/repo/ The react application has various files. The logo for example is located here /config/images/logo.png When we run the application on gh-pages, this application does not see this logo because it expects to see it here https://name.github.io/config/images/logo. png and we have it here https://name.github.io/repo/config/images/logo.png
Answer the question
In order to leave comments, you need to log in
For routing to gh-pages, you need to wrap the application in HashRouter
instead of BrowserRouter
/ Router
Why and why is this needed
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question