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
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.
i am having following issues with 2nd or greater level nested routes
for example the route http://localhost:3000/AdminPanel/vendors
webpack HMR is not working
refreshing the page gives me following errors in browser console
please note that i am having above issues with only 2nd or greater level nested routes