From c4aa28fbcc479b2f18879a3f09a37a5d5f3a6c13 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Thu, 16 Mar 2023 18:24:45 +0100 Subject: [PATCH] fix: add `virtual:` to virtual module source map ignore (#12444) --- packages/vite/src/node/server/sourcemap.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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[]