Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): when optimizing do not emit Ivy c…
Browse files Browse the repository at this point in the history
…lass metadata or module scope
  • Loading branch information
clydin authored and kyliau committed Jan 28, 2020
1 parent 34c37b0 commit b553514
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,17 @@ export function getAotConfig(wco: WebpackConfigOptions, i18nExtract = false) {
}

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

return {
module: { rules: [{ test, use: loaders }] },
plugins: [_createAotPlugin(wco, { tsConfigPath }, i18nExtract)]
plugins: [
_createAotPlugin(
wco,
{ tsConfigPath, emitClassMetadata: !optimize, emitNgModuleScope: !optimize },
i18nExtract,
),
],
};
}

Expand Down

0 comments on commit b553514

Please sign in to comment.