Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit 272205a

Browse files
committed
refactor(deep-linking): throw error when app ngmodule file not found
throw error when app ngmodule file not found
1 parent befac7b commit 272205a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/deep-linking.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ export function deepLinkingWorkerImpl(context: BuildContext, changedFiles: Chang
4040
return Promise.resolve().then(() => {
4141
const appNgModulePath = getStringPropertyValue(Constants.ENV_APP_NG_MODULE_PATH);
4242
const appNgModuleFile = context.fileCache.get(appNgModulePath);
43+
if (!appNgModuleFile) {
44+
throw new Error(`The main app NgModule was not found at the following path: ${appNgModulePath}`);
45+
}
4346
if (!cachedUnmodifiedAppNgModuleFileContent || hasAppModuleChanged(changedFiles, appNgModulePath)) {
4447
cachedUnmodifiedAppNgModuleFileContent = appNgModuleFile.content;
4548
}

0 commit comments

Comments
 (0)