I have some problems setting up a single page react app using react router with the webpackdevserver. If I use browserhistory webpack has some problems when entering a nested route url (/client/view for example). This could be solved adding apiFallback but hot reload does still have a problem. It tries to load the hot-update.json file from the deep url (/client/view/hot-update.json) which does not exist and therefor fails and reloads the page. How can i tell hotreload to always load the hot-update.json from the base url (/)?
相关问题
- How to toggle on Order in ReactJS
- Ignore Typescript errors in Webpack-dev-server
- Refreshing page gives Cannot GET /page_url in reac
- Adding a timeout to a render function in ReactJS
- React Native Inline style for multiple Text in sin
相关文章
- 运行"WEBPACK_ENV=online webpack -p",如何将.scss e6文件转化
- Why would we use useEffect without a dependency ar
- Is it possible to get ref of props.children?
- Stateless function components cannot be given refs
- React testing library: Test attribute / prop
- React/JestJS/Enzyme: How to test for ref function?
- Material-UI [v0.x] RaisedButton on hover styles
- Remove expo from react native
I had a similar issue when using a
publicPath
other than''
, which I solved by adding a proxy entry to thedevServer
options:Other than that, make sure both
output.publicPath
anddevServer.publicPath
is set and equal.Hope this helps!