I’m a very happy user of WSL2, it’s blazing fast and allows me to fiddle with projects that I otherwise would have issues with running on my Windows machine. I’m also a user of hugo, to create static homepages.
I was trying to figure out how to use sass and to pre-process those files into css using hugo’s built in pipes. I was scratching my head and cursing for a good while, trying to understand why the pipes where not working. Turns out that it wasn’t anything wrong with the pipes, it was the environment where I ran hugo.. 🤦♂️
- Project located on the Windows filesystem
Changing a file on the Windows filesystem does not trigger a notification that a file has changed to WSL2, this means that livereload will not work in hugo since no change has been detected.
- Move your project into your WSL2 directory and work from there
- File change notifications are working for WSL1, this is what I choose
People have been writing quite extensivly regarding this, but it seems to be a feature and not a bug according to Microsoft.
I decided to retire my old WSL1 setup, and by doing so it forced my to embrace the filesystem of WSL2. It’s working out for me, even though I was a bit skeptical about putting the project on the WSL2 mount.