redux-webpack-es6-boilerplate
redux-webpack-es6-boilerplate copied to clipboard
Routing fails on production build
When running npm start
and and navigating to, say, http://localhost:3000/some-page
I get to the route I defined in routes.js or the default 404
. that's good.
After building for production with npm run build
and serving with npm run build:serve
the main http://127.0.0.1:3003/
works but all other routes fail, giving browser 404 - This 127.0.0.1 page can’t be found.
Sorry if I'm missing something obvious.
the problem is with http-server. you'll have to find an alternative package such as spa-http-server that will enable you to direct all calls to index.html