Skip to content

Commit

Permalink
fix(entries): ensure dependency data from collections remains
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Feb 13, 2018
1 parent 29342e5 commit f9fb09a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/compiler/entries/component-dependencies.ts
Expand Up @@ -12,7 +12,12 @@ export function calcComponentDependencies(moduleFiles: ModuleFiles, moduleGraphs


function getComponentDependencies(moduleGraphs: ModuleGraph[], componentRefs: ComponentReference[], filePath: string, cmpMeta: ComponentMeta) {
cmpMeta.dependencies = componentRefs.filter(cr => cr.filePath === filePath).map(cr => cr.tag);
// we may have already figured out some dependencies (collections aready have this info)
cmpMeta.dependencies = cmpMeta.dependencies || [];

// push on any new tags we found through component references
cmpMeta.dependencies.push(...componentRefs.filter(cr => cr.filePath === filePath).map(cr => cr.tag));

const importsInspected: string[] = [];

const moduleGraph = moduleGraphs.find(mg => mg.filePath === filePath);
Expand Down

0 comments on commit f9fb09a

Please sign in to comment.