no-build-optimizer doesn't work @angular/cli:1.6.2
Again disappeared decoratoes @angular/cli": "1.6.2" the flag --no-build-optimizer does not work I am used ./node_modules/.bin/ng build --prod --no-build-optimizer
--no-build-optimizer not working in @angular/cli:1.6.2. But if use @angular/cli:1.5.0 then all
The flag was entered --no-build-optimizer, disabling optimization, now it does not work All decorators are deleted in 1.5.0 decorators remained with use --no-build-optimizer
JitCompiler does not see decorators on compiled components repo for reproduce https://github.com/Alekcei/no-build-optimizer contains two projects differing "@angular/cli": "1.5.0" and "@angular/cli": "1.6.2" testngcli150 works, the components are displayed testngcli162 not working, the components are don`t displayed
Custom decorators not stripped, stripped standart decorators
With @NgModule and @Component also does not work
As explained in #8728, AOT mode removes the application's decorators. AOT is the default for --prod; use --no-aot if JIT compilation is used with application code.
Also from the example code provided, the custom decorators are kept within the output. So that is not the issue here.
If using no-build-optimizer in --prod, the error is actually for TestModule and if not using the option the error is for CommonModule (the first in DynamicHtmlModule). Both of which are expected as TestModule is an application module and CommonModule is an Angular library module.
Everything appears to be working as intended. As mentioned in #8728, if additional options or different behavior is desired, please open a feature request detailing the use case that is currently not met by the CLI.
why it works in 1.5.0 ?
--prod --no-build-optimizer Must disable optimization. And in 1.5.0 it worked
Explain the reason why it stopped working
1.5 erroneously did not remove the application decorators. This was fixed in 1.6 which is also the behavior in versions prior to 1.5.
It turns out there is no sense from the flag
Why in other requests did this come up as a solution. Allow it to be disabled!
It is described in wiki https://github.com/angular/angular-cli/wiki/build Why should he if he can not use ? Consider disabling!
Plese add --disabled-stripped-decorators, but without resources
Plese disabled for
/[\\/]node_modules[\\/]@angular[\\/]animations[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]common[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]compiler[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]core[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]forms[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]http[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]platform-browser-dynamic[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]platform-browser[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]platform-webworker-dynamic[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]platform-webworker[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]router[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]upgrade[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]material[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]cdk[\\/]/,
];
from build-optimizer
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.