This is a minor update to an earlier post; the setup is simpler than previously described and the result is the same, Dart SASS in WSL2
You will need to download the latest release of dart sass from the official repo.
- Download and extract the dart-sass release you are going to use, at the time of this post I opted for
https://github.com/sass/dart-sass/releases/download/1.26.10/dart-sass-1.26.10-windows-x64.zip
- Open your
.bashrc
file in WSL –vi ~/.bashrc
- Add
export PATH="/path/to/dart-sass:$PATH"
to the end of the file, in my caseexport PATH="/mnt/c/Users/USERNAME/Documents/GitHub/dart-sass:$PATH"
To test everything is working, open WSL and enter sass --version
; you should see the version number.
Dart SASS is one the tools I install via WS. It is now longer part of y typically Laravel project setup, these days I have mostly switched to Tailwind for new projects.