-
Notifications
You must be signed in to change notification settings - Fork 12k
Angular Cli 1.0.0-beta.11-webpack.8: ng build failed if route 'loadChildren' #1891
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
Comments
"Unexpected token ' in JSON at position 0". :) |
Can confirm and reproduce. Moving to ` removes the error, but causes routing to fail. |
Do lazy modules work with a |
@monojack yes, works before update to angular-cli@webpack |
Can confirm I'm getting the same thing using:
|
Same same.
|
I believe the latest webpack branch ( beta.11-webpack.8 ) does not currently support lazy loaded modules yet. |
You are correct in a way. RC5 apparently uses System.js to do the lazy loading, since the CLI moved to Webpack that method is unavailable. It looks like the RC2 router and RC6 resolve the issue. Unfortunately for me, the Angular 2 Material team is a bit out of sync, so I can't upgrade to RC6 yet. I worked around it and implemented a basic async module loader for the time being. |
and properly understand and return the modules in this case. Also refactored that function to be clearer, and added a test to cover. I made sure the test was failing before this PR ;) Fixes angular#1891, angular#1960. cc @filipesilva @ericjim @chalin - See similar angular#1972
and properly understand and return the modules in this case. Also refactored that function to be clearer, and added a test to cover. I made sure the test was failing before this PR ;) Fixes angular#1891, angular#1960. cc @filipesilva @ericjim @chalin - See similar angular#1972
) * fix(find-lazy-modules): Allow for any valid keys/value to be used and properly understand and return the modules in this case. Also refactored that function to be clearer, and added a test to cover. I made sure the test was failing before this PR ;) Fixes #1891, #1960. cc @filipesilva @ericjim @chalin - See similar #1972 * cleanup
…gular#1987) * fix(find-lazy-modules): Allow for any valid keys/value to be used and properly understand and return the modules in this case. Also refactored that function to be clearer, and added a test to cover. I made sure the test was failing before this PR ;) Fixes angular#1891, angular#1960. cc @filipesilva @ericjim @chalin - See similar angular#1972 * cleanup
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
https://github.com/angular/angular-cli/blob/master/addon/ng2/models/find-lazy-modules.ts#L38
JSON.parse failed with :
The text was updated successfully, but these errors were encountered: