File tree 1 file changed +10
-7
lines changed
packages/@ngtools/webpack/src
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -167,13 +167,16 @@ export class AotPlugin implements Tapable {
167
167
168
168
if ( options . entryModule ) {
169
169
this . _entryModule = options . entryModule ;
170
- } else {
171
- if ( options . mainPath ) {
172
- this . _entryModule = resolveEntryModuleFromMain ( options . mainPath , this . _compilerHost ,
173
- this . _program ) ;
174
- } else {
175
- this . _entryModule = ( tsConfig . raw [ 'angularCompilerOptions' ] as any ) . entryModule ;
176
- }
170
+ } else if ( ( tsConfig . raw [ 'angularCompilerOptions' ] as any )
171
+ && ( tsConfig . raw [ 'angularCompilerOptions' ] as any ) . entryModule ) {
172
+ this . _entryModule = path . resolve ( this . _basePath ,
173
+ ( tsConfig . raw [ 'angularCompilerOptions' ] as any ) . entryModule ) ;
174
+ }
175
+
176
+ // still no _entryModule? => try to resolve from mainPath
177
+ if ( ! this . _entryModule && options . mainPath ) {
178
+ this . _entryModule = resolveEntryModuleFromMain ( options . mainPath , this . _compilerHost ,
179
+ this . _program ) ;
177
180
}
178
181
179
182
if ( options . hasOwnProperty ( 'i18nFile' ) ) {
You can’t perform that action at this time.
0 commit comments