sapphi-red / vite-plugin-static-copy

rollup-plugin-copy with dev server support.
MIT License
288 stars 31 forks source link

Consider normalizing paths by default #112

Closed wojtekmaj closed 5 months ago

wojtekmaj commented 6 months ago

A good chunk of README is about Windows support and how normalizePath needs to be used, "or else". Since my projects are regularly ran on multiple OSes, I use normalizePath in my configuration files and it seems to work just fine both on Windows and macOS. So why all this hassle? Is there any good reason for paths not to be normalized by default, allowing cross-OS configuration much more dev friendly?

sapphi-red commented 6 months ago

It's because the plugin doesn't know if \ means / (path separator) or \ (escape character). https://github.com/micromatch/micromatch#backslashes:~:text=In%20other%20words,more%20serious%2C%20problem If the plugin converts it automatically, users won't be able to escape characters.