]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(compiler-sfc): normalize windows paths when resolving types (#8136)
authoredison <daiwei521@126.com>
Mon, 24 Apr 2023 03:03:57 +0000 (11:03 +0800)
committerGitHub <noreply@github.com>
Mon, 24 Apr 2023 03:03:57 +0000 (11:03 +0800)
packages/compiler-sfc/src/script/resolveType.ts

index 13fe57e46a54c5161c6a658529c8ce974eacec51..ac1a42be9bd0a3bc015b32b7ef4f3b9d22a9c212 100644 (file)
@@ -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