File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
packages/@angular/cli/models Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ export class NgCliWebpackConfig<T extends BuildOptions = BuildOptions> {
9595 sourcemaps : true ,
9696 extractCss : false ,
9797 namedChunks : true ,
98- aot : false ,
98+ aot : AngularCompilerPlugin . isSupported ( ) ,
9999 buildOptimizer : false
100100 } ,
101101 production : {
@@ -112,7 +112,7 @@ export class NgCliWebpackConfig<T extends BuildOptions = BuildOptions> {
112112
113113 // Use Build Optimizer on prod AOT builds by default when AngularCompilerPlugin is supported.
114114 const buildOptimizerDefault = {
115- buildOptimizer : merged . aot && AngularCompilerPlugin . isSupported ( )
115+ buildOptimizer : buildOptions . target == 'production' && AngularCompilerPlugin . isSupported ( )
116116 } ;
117117
118118 merged = Object . assign ( { } , buildOptimizerDefault , merged ) ;
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export default function () {
5252 . then ( ( ) => replaceInFile ( './src/app/app.module.ts' , / \[ \s * B r o w s e r M o d u l e / g,
5353 `[BrowserModule.withServerTransition(\{ appId: 'app' \}), ServerModule` ) )
5454 . then ( ( ) => silentNpm ( 'install' ) )
55- . then ( ( ) => ng ( 'build' ) )
55+ . then ( ( ) => ng ( 'build' , '--aot=false' ) )
5656 // files were created successfully
5757 . then ( ( ) => expectFileToMatch ( 'dist/main.bundle.js' ,
5858 / _ _ w e b p a c k _ e x p o r t s _ _ , " A p p M o d u l e " / ) )
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export default function () {
5252 . then ( ( ) => replaceInFile ( './src/app/app.module.ts' , / \[ \s * B r o w s e r M o d u l e / g,
5353 `[BrowserModule.withServerTransition(\{ appId: 'app' \}), ServerModule` ) )
5454 . then ( ( ) => silentNpm ( 'install' ) )
55- . then ( ( ) => ng ( 'build' ) )
55+ . then ( ( ) => ng ( 'build' , '--aot=false' ) )
5656 // files were created successfully
5757 . then ( ( ) => expectFileToMatch ( 'dist/main.bundle.js' ,
5858 / _ _ w e b p a c k _ e x p o r t s _ _ , " A p p M o d u l e " / ) )
@@ -101,7 +101,7 @@ export default function () {
101101 fs.writeFileSync('dist/index.html', html);
102102 \});
103103 ` ) ) )
104- . then ( ( ) => ng ( 'build' , '--bundle-dependencies=all' ) )
104+ . then ( ( ) => ng ( 'build' , '--bundle-dependencies=all' , '--aot=false' ) )
105105 . then ( ( ) => expectToFail ( ( ) => expectFileToMatch ( './dist/main.bundle.js' ,
106106 / r e q u i r e \( [ " ' ] @ a n g u l a r \/ [ ^ " ' ] * [ " ' ] \) / ) ) )
107107 . then ( ( ) => exec ( normalize ( 'node' ) , 'dist/main.bundle.js' ) ) ;
You can’t perform that action at this time.
0 commit comments