From 67d0bb43923eb1a95da70b2ecac8fd738ad7767a Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Wed, 21 Aug 2024 19:14:57 +0900 Subject: [PATCH] fix: check `file://` not `file:` Co-authored-by: patak <583075+patak-dev@users.noreply.github.com> --- packages/vite/src/node/plugins/css.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/node/plugins/css.ts b/packages/vite/src/node/plugins/css.ts index e5ed214c8cd0fd..e447a486fc39b7 100644 --- a/packages/vite/src/node/plugins/css.ts +++ b/packages/vite/src/node/plugins/css.ts @@ -1096,7 +1096,7 @@ function createCSSResolvers(config: ResolvedConfig): CSSAtImportResolvers { }) sassResolve = async (...args) => { const id = args[0] - if (id.startsWith('file:')) { + if (id.startsWith('file://')) { const fileUrl = new URL(id) if (fs.existsSync(fileUrl)) { return fileURLToPath(fileUrl)