-
Notifications
You must be signed in to change notification settings - Fork 12k
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
target es2015 throw on circular dependency: Uncaught ReferenceError component is not defined #14247
Comments
Still trying to figure out what's happening here. Looked at it a bit today and added a github repro at https://github.com/filipesilva/es2015-forwardref. I see a different error though:
I tried checking if the usage of Angular's es2015 bundles had anything to do with it. We automatically use those when It seems to be related to the app code itself, and the result when transpiled to es5 vs es2015. Still not sure of why though. |
It's interesting to see what happens when The error shows up as:
Where
Which belongs to the rest of the parent component code:
So this is interesting. It errors out because
But there's an export at the top using the let before it's declared. That kinda looks like a bug in Webpack. |
I've made a simple reproduction and bug report on Webpack: webpack/webpack#9060 This issue is now blocked on a fix there. |
This issue was not caused by a Webpack bug but rather a problem between A temporary workaround is to remove the type in the constructor parameter for
I'm closing the issue here because it really should be addressed in the framework repository instead via angular/angular#30106, because it's not a CLI issue but a |
I have an NgRX stateful lazy loaded component feature module referenced in the router it was previously modeled with barrels which I removed I think the module construct should be sufficient no? same exception Angular CLI: 8.1.2 Package Version@angular-devkit/architect 0.801.2 |
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. |
🐞 Bug report
Is this a regression?
Yes, was working (target:es5) before targetting to es2015 by default
Description
A clear and concise description of the problem...🔬 Minimal Reproduction
🔥 Exception or Error
🌍 Your Environment
cc @filipesilva
The text was updated successfully, but these errors were encountered: