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

Commit

Permalink
fix(optimizations): throw error when ionic-angular index file isn't f…
Browse files Browse the repository at this point in the history
…ound
  • Loading branch information
danbucholtz committed Feb 13, 2017
1 parent 3e8d0e0 commit 6437005
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/optimization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ function purgeUnusedImports(context: BuildContext, purgeDependencyMap: Map<strin
// for now, restrict this to components in the ionic-angular/index.js file
const indexFilePath = process.env[Constants.ENV_VAR_IONIC_ANGULAR_ENTRY_POINT];
const file = context.fileCache.get(indexFilePath);
if (!file) {
throw new Error(`Could not find ionic-angular index file ${indexFilePath}`);
}
const modulesToPurge: string[] = [];
purgeDependencyMap.forEach((set: Set<string>, moduleToPurge: string) => {
modulesToPurge.push(moduleToPurge);
Expand Down

0 comments on commit 6437005

Please sign in to comment.