Skip to content

Commit 4886d9f

Browse files
authoredMar 29, 2023
feat(server): allow to import data: uris (#12645)
1 parent c1d3fc9 commit 4886d9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/vite/src/node/ssr/ssrModuleLoader.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ async function nodeImport(
235235
resolveOptions: InternalResolveOptionsWithOverrideConditions,
236236
) {
237237
let url: string
238-
if (id.startsWith('node:') || isBuiltin(id)) {
238+
if (id.startsWith('node:') || id.startsWith('data:') || isBuiltin(id)) {
239239
url = id
240240
} else {
241241
const resolved = tryNodeResolve(

0 commit comments

Comments
 (0)
Please sign in to comment.