My requirement is that I have to use my react SPA by loading local file URL as follows
file:///C:/react/build/index.html
without using any HTTP-server.
In this scenario, it's working with HTTP server correctly, but in the case of local file URL access, only initial component working correctly but Routing is not working.
it's giving following types of error in chrome-
Uncaught DOMException: Failed to execute 'pushState' on 'History': A history state object with URL 'file:///C:/react/build/Aboutus' cannot be created in a document with origin 'null' and URL 'file:///C:/react/build/index.html'.
and in firefox-
SecurityError: The operation is insecure. 1.d30e17d6.chunk.js:1 push/< createBrowserHistory.js:153 confirmTransitionTo createTransitionManager.js:33 push createBrowserHistory.js:146 e/i.handleClick Link.js:99 p/< react-dom.production.min.js:49 p react-dom.production.min.js:45 P/< react-dom.production.min.js:73 P react-dom.production.min.js:72 S react-dom.production.min.js:168 E react-dom.production.min.js:158 j react-dom.production.min.js:232 Tn react-dom.production.min.js:1712 Za react-dom.production.min.js:5451 Dt react-dom.production.min.js:660 Sn react-dom.production.min.js:1754 Fa react-dom.production.min.js:5479 Cn react-dom.production.min.js:1731 Cn self-hosted:1018:17
please suggest me some solution or give me some sample code. and please don't suggest to use any HTTP server method, because in this case, I have to do it without using any HTTP server.
I am using create-react-app method with react-router v4