Skip to content
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

fix(@ngtools/webpack): only remove decorators in VE #16086

Merged
merged 1 commit into from Nov 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/ngtools/webpack/src/angular_compiler_plugin.ts
Expand Up @@ -981,8 +981,11 @@ export class AngularCompilerPlugin {
// This is required to support forwardRef in ES2015 due to TDZ issues
this._transformers.push(downlevelConstructorParameters(getTypeChecker));
} else {
// Remove unneeded angular decorators.
this._transformers.push(removeDecorators(isAppPath, getTypeChecker));
if (!this._compilerOptions.enableIvy) {
// Remove unneeded angular decorators in VE.
// In Ivy they are removed in ngc directly.
this._transformers.push(removeDecorators(isAppPath, getTypeChecker));
}
// Import ngfactory in loadChildren import syntax
if (this._useFactories) {
// Only transform imports to use factories with View Engine.
Expand Down