Unverified Commit b998bd8e authored by vercel-fleet-prod[bot]'s avatar vercel-fleet-prod[bot] Committed by GitHub

bundle-analyzer: restore traced-dependents logic dropped by buildImportChain extraction

Co-authored-by: 's avatarWill Binns-Smith <wbinnssmith@gmail.com>
Co-authored-by: 's avatarWill Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
parent be14c4d5
......@@ -219,6 +219,7 @@ export function buildImportChain(
.map((index: number) => ({
index,
async: false,
traced: false,
depth: depthMap.get(index) ?? Infinity,
})),
...modulesData
......@@ -226,6 +227,15 @@ export function buildImportChain(
.map((index: number) => ({
index,
async: true,
traced: false,
depth: depthMap.get(index) ?? Infinity,
})),
...modulesData
.tracedModuleDependents(currentModuleIndex)
.map((index: number) => ({
index,
async: false,
traced: true,
depth: depthMap.get(index) ?? Infinity,
})),
]
......@@ -242,7 +252,7 @@ export function buildImportChain(
// Build info for each dependent
const dependentsInfo: DependentInfo[] = validDependents.map(
({ index: moduleIndex, async: isAsync, depth }) => {
({ index: moduleIndex, async: isAsync, traced: isTraced, depth }) => {
const sourceIndex = getSourceIndexFromModuleIndex(moduleIndex)
let ident = modulesData.module(moduleIndex)?.ident || ''
return {
......@@ -250,6 +260,7 @@ export function buildImportChain(
sourceIndex,
ident,
isAsync,
isTraced,
depth,
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment