Closed timacdonald closed 2 years ago
Thanks Tim! We'll need to add vite
as a peer dependency now, I'll do that on a separate PR.
@ElMassimo were you able to test this fix to validate it? I finally got a Windows virtual machine setup so I can test it if you didn't yourself?
edit: oh, I see that @guasam tested it for us! Thank you!
p.s. my bad on the peer dependency! thanks for adding that in.
(hopefully) Fixes #6
My (possibly flawed) understanding of the problem is that the
path.resolve
function is converting POSIX paths to Windows paths on Windows machines.So specifying...
results in...
after calling...
chokidar.watch
is then expecting to receive POSIX paths. From the docs...So it all breaks down.
This PR proposes that we pipe all paths through Vite's
normalizePath
function before passing tochokidar
. I believe this is the recommended way of doing things:The
normalizePath
function is available in Vite 2 and Vite 3.