Explorar el Código

fix(compiler-sfc): normalize windows paths when resolving types (#8136)

edison hace 3 años
padre
commit
29da504687
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packages/compiler-sfc/src/script/resolveType.ts

+ 1 - 1
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