Skip to content

Commit

Permalink
Merge branch 'main' into fix-specifier-resolved-by-other-loader
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobJingleheimer authored Mar 21, 2024
2 parents 8da7517 + fdf9156 commit a665c13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/quibble.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ export async function resolve (specifier, context, nextResolve) {
const { parentURL } = context

try {
const { url } = await resolve()
const { url, ...ctx } = await resolve()

const quibbledUrl = addQueryToUrl(url, '__quibble', stubModuleGeneration)

if (url.startsWith('node:') && !getStubsInfo(quibbledUrl)) {
return { url }
return { ...ctx, url } // It's allowed to change ctx for a builtin (but unlikely)
}

return { url: quibbledUrl }
return { ...ctx, url: quibbledUrl }
} catch (error) {
if (error.code === 'ERR_MODULE_NOT_FOUND') {
return {
Expand Down

0 comments on commit a665c13

Please sign in to comment.