Closed ncksllvn closed 8 years ago
Hi,
still need to investigate on this issue. Could you send me a link to the project you are building?
If this is not possible, at least your routing config may help.
Also I know that some functions (e.g. Flux-Frameworks) will not hold their state on hot reloading. I am currently thinking about removing the react-hot-loader completely.
I love the hot reload feature; just discovered that one issue I was having. My project isn't hosted publicly but here's the summary:
http://localhost:4000/app
=> http://localhost:8000/assets/8b92334d8f274206dd47.hot-update.json
=> 200
http://localhost:4000/app/users
=> http://localhost:8000/app/assets/8b92334d8f274206dd47.hot-update.json
=> 404
My routes, defined in src/index.js
:
<Provider store={store}>
<Router history={history}>
<Route path="login" component={Login}/>
<Route path="join" component={Join}/>
<Redirect from="/" to="app"/>
<Route path="app" component={App}>
<Route path="users" component={Users}/>
</Route>
<Route path="*" component={NoMatch}/>
</Router>
</Provider>
I don't know if removing that leading .
in the output.publicPath
will have other consequences, but I haven't discovered any yet.
Hi, it does not seem so. I added it so users are able to use the generator in relative directories. However, this does not play nice with react router subroutes, you are right on that. Mine where also broken as it turned out, I just never noticed it :(. Will move this back (or think about a complete new approach) for the next version. Thank you anyway for your help!
As referenced here, I found the hot update returning 404's with the leading period in the
output.publicPath
property defined incfg/base.js
when using the History API (specifically, React Router). I don't think this problem is unique to me because I didn't modify the config files.