@@ -22,6 +22,7 @@ export async function runAot(context: BuildContext, options: AotOptions) {
2222
2323 const angularCompilerOptions = Object . assign ( { } , {
2424 basePath : options . rootDir ,
25+ genDir : options . rootDir ,
2526 entryPoint : options . entryPoint
2627 } ) ;
2728
@@ -38,7 +39,7 @@ export async function runAot(context: BuildContext, options: AotOptions) {
3839 await runNg5Aot ( tsConfig , aggregateCompilerOption , compilerHost ) ;
3940 } else {
4041 await runNg4Aot ( {
41- angularCompilerOptions : angularCompilerOptions ,
42+ angularCompilerOptions : aggregateCompilerOption ,
4243 cliOptions : {
4344 i18nFile : undefined ,
4445 i18nFormat : undefined ,
@@ -55,7 +56,8 @@ export async function runAot(context: BuildContext, options: AotOptions) {
5556 errorCheckProgram ( context , tsConfig , compilerHost , tsProgram ) ;
5657
5758 // update bootstrap in main.ts
58- const mainFile = context . fileCache . get ( changeExtension ( options . entryPoint , '.js' ) ) ;
59+ const mailFilePath = isNg5 ( context . angularVersion ) ? changeExtension ( options . entryPoint , '.js' ) : options . entryPoint ;
60+ const mainFile = context . fileCache . get ( mailFilePath ) ;
5961 const modifiedBootstrapContent = replaceBootstrap ( mainFile , options . appNgModulePath , options . appNgModuleClass , options ) ;
6062 mainFile . content = modifiedBootstrapContent ;
6163
0 commit comments