Skip to content

Commit 8763c64

Browse files
alan-agius4filipesilva
authored andcommitted
fix(@ngtools/webpack): issue warning when using strictMetadataEmit
`strictMetadataEmit` option which is not intended to be used for applications. See: https://angular.io/guide/angular-compiler-options#strictmetadataemit Closes #18424
1 parent 042c33c commit 8763c64

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/ngtools/webpack/src/angular_compiler_plugin.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,14 @@ export class AngularCompilerPlugin {
276276
);
277277
}
278278

279+
if (this._compilerOptions.strictMetadataEmit) {
280+
this._warnings.push(
281+
new Error(
282+
`Using Angular compiler option 'strictMetadataEmit' for applications might cause undefined behavior.`,
283+
),
284+
);
285+
}
286+
279287
if (this._discoverLazyRoutes === false && this.options.additionalLazyModules
280288
&& Object.keys(this.options.additionalLazyModules).length > 0) {
281289
this._warnings.push(

0 commit comments

Comments
 (0)