Skip to content

Commit f85c00a

Browse files
clydinKeen Yee Liau
authored and
Keen Yee Liau
committedJan 28, 2020
fix(@angular-devkit/build-angular): when optimizing do not emit Ivy class metadata or module scope
1 parent 48d142c commit f85c00a

File tree

1 file changed

+8
-1
lines changed
  • packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs

1 file changed

+8
-1
lines changed
 

‎packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,17 @@ export function getAotConfig(wco: WebpackConfigOptions, i18nExtract = false) {
122122
}
123123

124124
const test = /(?:\.ngfactory\.js|\.ngstyle\.js|\.tsx?)$/;
125+
const optimize = wco.buildOptions.optimization.scripts;
125126

126127
return {
127128
module: { rules: [{ test, use: loaders }] },
128-
plugins: [_createAotPlugin(wco, { tsConfigPath }, i18nExtract)]
129+
plugins: [
130+
_createAotPlugin(
131+
wco,
132+
{ tsConfigPath, emitClassMetadata: !optimize, emitNgModuleScope: !optimize },
133+
i18nExtract,
134+
),
135+
],
129136
};
130137
}
131138

0 commit comments

Comments
 (0)