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 042c33c commit 8763c64
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/ngtools/webpack/src/angular_compiler_plugin.ts
Expand Up @@ -276,6 +276,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 8763c64

Please sign in to comment.