I’ve been quite interested in transitioning away from my standard gulp build process to make use of the Hugo’s native asset build pipeline. However, it seems the sass implementation is built on libsass which currently doesn’t support the newly introduced @use modular system (@import to be deprecated in a couple of years or so).
From reading the blogs it seems the Sass team is planning to make Dart Sass will become the primary implementation of sass moving forward.
Are there any plans to switch to the dart-sass to support this new feature or will hugo continue to update the libsass library once this feature gets implemented more broadly?
I have upgraded Hugo’s libsass integration (phew!). In master we’re now at LibSass 3.6.3 (the latest). But Sass Modules isn’t in LibSass yet (I think it’s in their Work In Progress 4.0 branch) – but at least this means we’re ready for it when it when it comes.
It seems like Sass team have decided to deprecate Libsass and only supporting dart-sass going forward. What will this mean for Hugo’s native sass compilation?
What will this mean for Hugo’s native sass compilation?
That it will migrate to a way to compile CSS files that is not deprecated. The big bad word “deprecated” by the way does not mean it’s dead. It will die in-officially in October 2021 and officially in October 2022 according to the announcement. Which is many quarantine days in the future
I started implementing the “Hugo dart SASS” support tonight. Hoping to get it into my XMas release. It will mean that you would need to install Dart Sass on your PC in addition to Hugo (e.g brew install sass/sass/sass), and (I have not checked) but I would expect Netlify and gang to provide that too if they’re not already doing it.
Both – LibSASS is currently the only reason we build an extended version, but that may change if we for some reason need to integrate with some other C/C++ libraries.
The embedded Dart is in beta 5 which I assume means “pretty mature” – so I’ll consider adding this as an optional SCSS implementation in toCSS – and we can consider making it the default later.