diff --git a/packages/vite/src/node/server/sourcemap.ts b/packages/vite/src/node/server/sourcemap.ts index 4c3931fe357181..f5c57cadb5b72b 100644 --- a/packages/vite/src/node/server/sourcemap.ts +++ b/packages/vite/src/node/server/sourcemap.ts @@ -12,7 +12,7 @@ const debug = createDebugger('vite:sourcemap', { // Virtual modules should be prefixed with a null byte to avoid a // false positive "missing source" warning. We also check for certain // prefixes used for special handling in esbuildDepPlugin. -const virtualSourceRE = /^(?:\0|dep:|browser-external:)/ +const virtualSourceRE = /^(?:dep:|browser-external:|virtual:)|\0/ interface SourceMapLike { sources: string[]