Skip to content

Commit

Permalink
feat(server): allow to import data: uris (#12645)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanhofer authored Mar 29, 2023
1 parent c1d3fc9 commit 4886d9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/ssr/ssrModuleLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ async function nodeImport(
resolveOptions: InternalResolveOptionsWithOverrideConditions,
) {
let url: string
if (id.startsWith('node:') || isBuiltin(id)) {
if (id.startsWith('node:') || id.startsWith('data:') || isBuiltin(id)) {
url = id
} else {
const resolved = tryNodeResolve(
Expand Down

0 comments on commit 4886d9f

Please sign in to comment.