kiwilan / nuxt-svg-transformer

Nuxt 3 module. Transform SVG to inject dynamically into Vue component, type included. Powered by unplugin.
https://github.com/kiwilan/unplugin-svg-transformer
MIT License
27 stars 6 forks source link

Cache file name is including path in Windows OS #3

Closed FarhanShares closed 1 year ago

FarhanShares commented 1 year ago

Hello again!

Few of my team members (at least 2) said that they were having file names generated that includes the absolute paths in the /cache/* directory. The screenshot will make it clear hopefully.

image_2022_12_09T20_57_55_098Z

So /icons/github.svg is not converted to /icons/cache/github.ts Rather, it's converted to something like /icons/cache/-users-farhan-dev-project-assets-icons-svg-github.ts

This is happening when ran from directly in Windows OS env (meaning no WSL2 / Docker involved. I've found It working with WSL2 and also with Docker - inside a linux container) Also there's no issues on MacOS so far.

This is making an inconsistency. I wanted to investigate but I couldn't reproduce it due to not having a Windows Machine in hand right now, so I thought it would be better to put it here. You will probably have a better idea what might go wrong.

ewilan-riviere commented 1 year ago

Thanks for this issue, I didn't test it on Windows OS. I publish 0.0.7 version, could you ask to your team to test it on Windows?

adr1enbe4udou1n commented 1 year ago

Hello ! Got the same bug on Windows 11 with v0.0.6, but working perfectly well since v0.0.7 (TS types for icon name included) ❤️ Viva Argentina 🇦🇷, Well Played 🇫🇷

FarhanShares commented 1 year ago

Looking good now [I've not tested but got the response from my team].

Thank you very much.