Skip to content

Commit

Permalink
fix(hmr): pass id in parseImports for better debugging DX (#15707)
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu authored Jan 24, 2024
1 parent 6c4bf26 commit fb4bddc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/server/transformRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ async function handleModuleSoftInvalidation(
await init
const source = transformResult.code
const s = new MagicString(source)
const [imports] = parseImports(source)
const [imports] = parseImports(source, mod.id || undefined)

for (const imp of imports) {
let rawUrl = source.slice(imp.s, imp.e)
Expand Down

0 comments on commit fb4bddc

Please sign in to comment.