You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Imports does not works in dynamic components in production mode #27405
@trotyl ... lol, so did I really remember that correctly?
The resume could be then: If you disable build-optimzer step you are able to keep decorators in the final AOT code but it also means that its size is actually significantly much bigger. Right?
@mlc-mlapis The fact is there're two steps going to remove the decorator, only disabling both of them could make decorators kept in runtime, but the removeDecorators cannot be disabled now.
Activity
trotyl commentedon Dec 3, 2018
All metadata are stripped by
@angular/cliduring AOT build process, it’s not possible to rely on runtime metadata while using the CLI.mlc-mlapis commentedon Dec 3, 2018
@trotyl ... hmm, theoretically possible by disabling the optimization step during AOT build process?
trotyl commentedon Dec 3, 2018
@mlc-mlapis
optimizationis mostly about webpack/uglify level configuration, whileremoveDecoratorsis an direct step in transformers controlled by JIT/AOT switch.Duplicate of angular/angular-cli#9306
mlc-mlapis commentedon Dec 3, 2018
@trotyl ... ah, I already forgot about the details of that issue. You are right. Thanks.
trotyl commentedon Dec 3, 2018
@mlc-mlapis It's indeed confusing, there's also a build-optimizer step doing the same thing...
mlc-mlapis commentedon Dec 3, 2018
@trotyl ... lol, so did I really remember that correctly?
The resume could be then: If you disable
build-optimzer stepyou are able to keep decorators in the final AOT code but it also means that its size is actually significantly much bigger. Right?trotyl commentedon Dec 3, 2018
@mlc-mlapis The fact is there're two steps going to remove the decorator, only disabling both of them could make decorators kept in runtime, but the
removeDecoratorscannot be disabled now.mlc-mlapis commentedon Dec 3, 2018
@trotyl ... I understand. OK.
alxhub commentedon Dec 11, 2018
Please do not file questions or support requests on the GitHub issues tracker.
You can get your questions answered using other communication channels. Please see: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Thank you!
johncrim commentedon Dec 13, 2018
Note that this problem can be fixed by adding
import 'core-js/es7/reflect';to polyfills.ts.I was having the same problem. @alexzuza explains why this is necessary here:
#27584 (comment)
I've updated https://github.com/johncrim/angular-dynamic-styleguide in the hopes this can help others with dynamic components in AOT/--prod builds.
angular-automatic-lock-bot commentedon Sep 14, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.