-
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
NgModule entryComponents shaked out of the production bundle #5883
Comments
I'm experiencing the same issue |
This seems like a CLI issue only, because after follow the AoT Instructions and fix some Rollup issues I got my App working with no problem and 8Mb less :) |
Additionally, I've tried to I'm working with |
Is this getting any attention or are there any workarounds? I'm quite paralysed by this bug unfortunately in one of my projects :( |
Having the same issue here. For the time being, one can only use AoT (without tree shaking, minification, file name hashing that |
Same here. @filipesilva any chance that will be fixed in nearest future? Thank you. |
Heya all, sorry it took so long to get a reply to this. I'm not sure what's happening but we will investigate. Sounds like a bug if it works with |
@matheo @lauriliivamagi @glebsts Seems to be issue with |
@sumitarora Seems that you found it, maybe some option of |
Just a wild guess: could it be related to #1644 and the |
@lauriliivamagi It is related to |
we are having the same issue. @sumitarora How do you remove the UglifyJsPlugin from the Angular CLI build? |
I had this issue occurring with the exact same architecture. The only workaround was to hack/disable UglifyJS on the build but that is not an ideal solution. Definitely need to figure out a way to make working uglified code. |
Same here, guys. I've just disabled Uglify Plugin and everything works just fine. I can live without it for a while, but hope you'll be able to fix this bug. |
Heya all, I've had some time to look at the repro @matheo provided and am sorry to say that the root of the problem was exactly the same as in #2965 (comment) (and later #6454 (comment)): you were relying on the Here is a fix for the example you provided: https://github.com/filipesilva/ng-dynacomponents/commit/711caf59440dc90830b1e26bf1a9677d6ee86da3 |
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 or Feature Request (mark with an
x
)Versions.
Ubuntu 16.04
Repro steps.
I just followed the example on Dynamic Component Loading, and it says:
So, building the App should work, but it doesn't:
The log given by the failure.
I have an initial state defined like:
but after the tree shaking it becomes something like:
and throws:
Desired functionality.
Building an app with dynamic components loading ok after tree-shaking.
Mention any other details that might be useful.
Note that I'm not using string component names as in #2965.
I'm using the Type and I've built a repo to demo that production builds doesn't work:
https://github.com/matheo/ng-dynacomponents
Dev build: https://matheo.github.io/ng-dynacomponents/dev/ (works)
Production: https://matheo.github.io/ng-dynacomponents/prod/ (broken)
Thanks in advance for any tip!
cc @filipesilva
The text was updated successfully, but these errors were encountered: