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

Commit 6437005

Browse files
committed
fix(optimizations): throw error when ionic-angular index file isn't found
1 parent 3e8d0e0 commit 6437005

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/optimization.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ function purgeUnusedImports(context: BuildContext, purgeDependencyMap: Map<strin
6767
// for now, restrict this to components in the ionic-angular/index.js file
6868
const indexFilePath = process.env[Constants.ENV_VAR_IONIC_ANGULAR_ENTRY_POINT];
6969
const file = context.fileCache.get(indexFilePath);
70+
if (!file) {
71+
throw new Error(`Could not find ionic-angular index file ${indexFilePath}`);
72+
}
7073
const modulesToPurge: string[] = [];
7174
purgeDependencyMap.forEach((set: Set<string>, moduleToPurge: string) => {
7275
modulesToPurge.push(moduleToPurge);

0 commit comments

Comments
 (0)