Skip to content

Commit

Permalink
restore querystring when making recursive analyzeAndEmitDependency
Browse files Browse the repository at this point in the history
…call in `maybeEmitDep`
  • Loading branch information
lobsterkatie committed Nov 17, 2022
1 parent 09b9b01 commit 6133dd9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/node-file-trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,15 @@ export class Job {

// For simplicity, force `resolved` to be an array
resolved = Array.isArray(resolved) ? resolved : [resolved];
for (const item of resolved) {
for (let item of resolved) {
// ignore builtins
if (item.startsWith('node:')) return;

// If querystring was stripped during resolution, restore it
if (queryString && !item.endsWith(queryString)) {
item += queryString;
}

await this.analyzeAndEmitDependency(item, path, cjsResolve);
}
}
Expand Down

0 comments on commit 6133dd9

Please sign in to comment.