Subscribe on changes!

Outer folder type/interface import in SFC fails on Windows (path.posix.join issue)

avatar
Nov 10th 2023

Vue version

3.3.8

Link to minimal reproduction

https://github.com/b12k/vue-sfc-compiler-issue

Steps to reproduce

Easy way:

Can be reproduced by simply extending unit test with additional condition. https://github.com/vuejs/core/pull/9478/files#diff-ba884e3c055eca4af5d6c4a16daa31397a191ceabac0a4018a2b612b781360b5R484-R489

See with own eyes way:

What is expected?

It should be possible to import type definitions from outer folders.

What is actually happening?

[@vue/compiler-sfc] Failed to resolve import source "../outer-folder"

System Info

System:
  OS: Windows 11 Pro
Binaries:
  Node: 20.9.0 - ~\AppData\Local\fnm_multishells\70852_1699634305330\node.EXE
  Yarn: 1.22.19 - ~\AppData\Local\fnm_multishells\70852_1699634305330\yarn.CMD
npmPackages:
  vue: 3.3.8 => 3.3.8

Any additional comments?

This PR https://github.com/vuejs/core/pull/9478 fixes this issue.