-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected '!' in 'bundle-loader #5148
Comments
This isn't a router issue. |
Maybe but whatever documentation given here https://reacttraining.com/react-router/web/guides/code-splitting is not making things very clear. |
Are you using Webpack 2? You need to set it up and use it according to their docs: https://github.com/webpack-contrib/bundle-loader#usage |
React Router documentation proposes to use Create React App for testing the examples (https://reacttraining.com/react-router/web/guides/quick-start) and maintainers of that project propose not to use bundle-loader (facebook/create-react-app#2477). And as syntax given in code-splitting example doesn't work with CRA, maybe it could be mentioned in the documentation. |
I'm getting this error while working on code splitting with React router. As per the guideline when I'm using bundle loader to lazy load a component, I'm getting this error constantly. I've also installed bundle-loader npm package, but no luck. My import statement is given below
import loadSignin from 'bundle-loader?lazy&name=signin!./views/signin';
Version
4.0.0
Test Case
https://codepen.io/ReactJSTraining/pen/jyYjeW
Steps to reproduce
Expected Behavior
Actual Behavior
The text was updated successfully, but these errors were encountered: