Skip to content

Commit ad88220

Browse files
committed
restore querystring when making recursive analyzeAndEmitDependency call in maybeEmitDep
1 parent baa94be commit ad88220

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/node-file-trace.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,15 @@ export class Job {
268268

269269
// For simplicity, force `resolved` to be an array
270270
resolved = Array.isArray(resolved) ? resolved : [resolved];
271-
for (const item of resolved) {
271+
for (let item of resolved) {
272272
// ignore builtins
273273
if (item.startsWith('node:')) return;
274+
275+
// If querystring was stripped during resolution, restore it
276+
if (queryString && !item.endsWith(queryString)) {
277+
item += queryString;
278+
}
279+
274280
await this.analyzeAndEmitDependency(item, path, cjsResolve);
275281
}
276282
}

0 commit comments

Comments
 (0)