Skip to content

Commit

Permalink
fix(vite-node): externalize network imports
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Jan 17, 2024
1 parent 3981435 commit cfdb38d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/vite-node/src/externalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ async function _shouldExternalize(
return id

// data: should be processed by native import,
// since it is a feature of ESM
if (id.startsWith('data:'))
// since it is a feature of ESM.
// also externalize network imports since nodejs allows it when --experimental-network-imports
if (id.startsWith('data:') || /^(https?:)?\/\//.test(id))
return id

id = patchWindowsImportPath(id)
Expand Down

0 comments on commit cfdb38d

Please sign in to comment.