dvdzkwsk / react-redux-starter-kit

Get started with React, Redux, and React-Router.
MIT License
10.28k stars 2.2k forks source link

having multiple issues with deeply nested routes #1303

Open noorrgb opened 7 years ago

noorrgb commented 7 years ago

i am having following issues with 2nd or greater level nested routes

for example the route http://localhost:3000/AdminPanel/vendors

  1. webpack HMR is not working

  2. refreshing the page gives me following errors in browser console

manifest.js:1 Uncaught SyntaxError: Unexpected token <

  1. when i use require.ensure([], (require).... for code splitting point, it doesn't work for nested routes. when i visit the route the browser console gives following errors

Uncaught SyntaxError: Unexpected token < Error: Loading chunk 6 failed. at HTMLScriptElement.onScriptComplete bootstrap fd1a659…:742 Uncaught (in promise) Error: Loading chunk 6 failed. at HTMLScriptElement.onScriptComplete

please note that i am having above issues with only 2nd or greater level nested routes

noorrgb commented 7 years ago

i observed that above issues disappear when i configure react-router to use hash based URL routing. It seems react-router and history based routing doesn't work well with webpack.