File tree 1 file changed +17
-0
lines changed
packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -308,6 +308,23 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
308
308
// Do nothing, the default above will be used instead.
309
309
}
310
310
311
+ if ( buildOptions . aot ) {
312
+ // Also try to load AOT-only global definitions.
313
+ try {
314
+ // tslint:disable-next-line:no-implicit-dependencies
315
+ const GLOBAL_DEFS_FOR_TERSER_WITH_AOT =
316
+ require ( '@angular/compiler-cli' ) . GLOBAL_DEFS_FOR_TERSER_WITH_AOT ;
317
+ if ( GLOBAL_DEFS_FOR_TERSER_WITH_AOT ) {
318
+ angularGlobalDefinitions = {
319
+ ...angularGlobalDefinitions ,
320
+ ...GLOBAL_DEFS_FOR_TERSER_WITH_AOT ,
321
+ } ;
322
+ }
323
+ } catch {
324
+ // Do nothing.
325
+ }
326
+ }
327
+
311
328
const terserOptions = {
312
329
ecma : wco . supportES2015 ? 6 : 5 ,
313
330
warnings : ! ! buildOptions . verbose ,
You can’t perform that action at this time.
0 commit comments