Skip to content

Commit

Permalink
fix(@ngtools/webpack): only remove decorators in VE
Browse files Browse the repository at this point in the history
  • Loading branch information
filipesilva committed Nov 6, 2019
1 parent da6d74a commit 9eba2cc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/ngtools/webpack/src/angular_compiler_plugin.ts
Original file line number Diff line number Diff line change
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

0 comments on commit 9eba2cc

Please sign in to comment.