vanilla-extract-css / vanilla-extract

Zero-runtime Stylesheets-in-TypeScript

Home Page:https://vanilla-extract.style

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Windows css resolution

Nvos opened this issue · comments

commented

Describe the bug

It seems that vite plugin function getAbsoluteId always receives unix path (even on windows) and uses path.sep due to which comparison fails on windows resulting in failing to find matching css in cssCache

Issue seems to be there:

filePath.split(path.sep)[1] === config.root.split(path.sep)[1])

Reproduction

https://github.com/Nvos/vanilla-extract-vinxi-repro

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
    Memory: 21.50 GB / 31.80 GB
  Binaries:
    Node: 18.15.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 9.5.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.6.7 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Edge: Chromium (122.0.2365.66)
    @vanilla-extract/css: ^1.14.1 => 1.14.1
    @vanilla-extract/vite-plugin: ^4.0.4 => 4.0.4

Used Package Manager

pnpm

Logs

No response

Validations

This could potentially be the same issue as #1339. Thanks for investigating.

Same error here dai-shi/waku#559