diff --git a/src/ModuleLoader.ts b/src/ModuleLoader.ts index 7fd31350013..e23ce2cc501 100644 --- a/src/ModuleLoader.ts +++ b/src/ModuleLoader.ts @@ -549,12 +549,14 @@ export class ModuleLoader { }; } - private async handleExistingModule(module: Module, isEntry: boolean, isPreload: PreloadType) { + private async handleExistingModule( + module: Module, + isEntry: boolean, + isPreload: PreloadType + ): Promise { const loadPromise = this.moduleLoadPromises.get(module)!; if (isPreload) { - return isPreload === RESOLVE_DEPENDENCIES - ? waitForDependencyResolution(loadPromise) - : loadPromise; + isPreload === RESOLVE_DEPENDENCIES ? waitForDependencyResolution(loadPromise) : loadPromise; } if (isEntry) { module.info.isEntry = true; @@ -564,7 +566,7 @@ export class ModuleLoader { } module.implicitlyLoadedAfter.clear(); } - return this.fetchModuleDependencies(module, ...(await loadPromise)); + this.fetchModuleDependencies(module, ...(await loadPromise)); } private handleResolveId(