Closed ncksllvn closed 8 years ago
Hi @ncksllvn,
I currently have a project using deeper routes in react router without problems. Do you have historyApiFallback set in your webpack config? Without this, routes will not update.
However, it should be enabled by default in cfg/base.js per default. Could you send your react router and webpack config?
I actually just found this problem. The output.publicPath
property defined in cfg/base.js
has a leading .
. Removing that fixed the 404's I was getting.
publicPath: `${defaultSettings.publicPath}`
I don't recall ever changing that file though so that makes me think this is a bug.
Actually I suppose this is a problem with the react-webpack-template project, not the generator. Is that right?
Seems like that. I will close this issue so we can continue in the webpack template.
@ncksllvn ,thx, It also happens to me when using webpack-dev-sever without config outPath : '/'
.
I've found that when using routes going deeper than one level, the hot update returns a 404.
Font Awesome has the same problem when its LESS files try to reference its font directory:
This problem doesn't happen when using the
webpack-dev-server/
in the URL so I'm not sure if this is really an issue, but that doesn't really play well with testing using the React Router since it's no longer storing the URL in the address bar.