Skip to content

Commit

Permalink
fix(@ngtools/webpack): issue warning when using strictMetadataEmit
Browse files Browse the repository at this point in the history
`strictMetadataEmit` option which is not intended to be used  for applications. See: https://angular.io/guide/angular-compiler-options#strictmetadataemit

Closes #18424
  • Loading branch information
alan-agius4 authored and filipesilva committed Aug 10, 2020
1 parent 780c82d commit fb94db7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/ngtools/webpack/src/angular_compiler_plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,14 @@ export class AngularCompilerPlugin {
);
}

if (this._compilerOptions.strictMetadataEmit) {
this._warnings.push(
new Error(
`Using Angular compiler option 'strictMetadataEmit' for applications might cause undefined behavior.`,
),
);
}

if (this._discoverLazyRoutes === false && this.options.additionalLazyModules
&& Object.keys(this.options.additionalLazyModules).length > 0) {
this._warnings.push(
Expand Down

0 comments on commit fb94db7

Please sign in to comment.