From e0c887cc2cddba19efb1257f76c9a6cc52dc84b0 Mon Sep 17 00:00:00 2001 From: ygj6 <7699524+ygj6@users.noreply.github.com> Date: Mon, 2 Aug 2021 11:47:51 +0800 Subject: [PATCH] fix: the return value of resolve by adding a namespace when processing a '@' in filter (#3534) --- packages/vite/src/node/optimizer/scan.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/vite/src/node/optimizer/scan.ts b/packages/vite/src/node/optimizer/scan.ts index 91931168e67846..871263c60a7cac 100644 --- a/packages/vite/src/node/optimizer/scan.ts +++ b/packages/vite/src/node/optimizer/scan.ts @@ -282,9 +282,11 @@ function esbuildScanPlugin( } return externalUnlessEntry({ path: id }) } else { + const namespace = htmlTypesRE.test(resolved) ? 'html' : undefined // linked package, keep crawling return { - path: path.resolve(resolved) + path: path.resolve(resolved), + namespace } } } else {