From 3499021a07c100534a08582d57ad6c599478dd6c Mon Sep 17 00:00:00 2001 From: edison1105 Date: Sat, 22 Apr 2023 14:18:13 +0800 Subject: [PATCH] fix(compiler-sfc): normalize windows paths when resolving types --- packages/compiler-sfc/src/script/resolveType.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-sfc/src/script/resolveType.ts b/packages/compiler-sfc/src/script/resolveType.ts index 13fe57e46a5..ac1a42be9bd 100644 --- a/packages/compiler-sfc/src/script/resolveType.ts +++ b/packages/compiler-sfc/src/script/resolveType.ts @@ -718,7 +718,7 @@ function importSourceToScope( let resolved if (source.startsWith('.')) { // relative import - fast path - const filename = path.join(scope.filename, '..', source) + const filename = normalizePath(path.join(scope.filename, '..', source)) resolved = resolveExt(filename, fs) } else { // module or aliased import - use full TS resolution, only supported in Node