File tree 1 file changed +8
-7
lines changed
packages/@ngtools/webpack/src
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -167,13 +167,14 @@ 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 ( this . _angularCompilerOptions . entryModule ) {
171
+ this . _entryModule = path . resolve ( this . _basePath , this . _angularCompilerOptions . entryModule ) ;
172
+ }
173
+
174
+ // still no _entryModule? => try to resolve from mainPath
175
+ if ( ! this . _entryModule && options . mainPath ) {
176
+ this . _entryModule = resolveEntryModuleFromMain ( options . mainPath , this . _compilerHost ,
177
+ this . _program ) ;
177
178
}
178
179
179
180
if ( options . hasOwnProperty ( 'i18nFile' ) ) {
You can’t perform that action at this time.
0 commit comments