- Merge request !69Draft: Issue #3282120 by rhovland and Abdullah Yassin: Switch to using dart sass β (Open) created by rhovland
- πΊπΈUnited States rhovland Oregon
I switched over to Dart Sass.
The package node-sass-magic-importer was removed. It's only used function was to support glob syntax in @import. The places where globs were used all files were specified.
The package nodemon was removed. Dart Sass has built in support for watching and compiling changes. Changed watch script to make use of it.
Updated autoprefixer to the latest version. It doesn't seem to be used in the project though.
I recompiled the CSS. There were no significant changes besides some code style changes. Color hex values are compiled into rgb values. blank lines between selectors were removed. Map files were generated which will help with debugging the resulting CSS.
- πΊπΈUnited States rhovland Oregon
I don't think adding the node constraint is advisable. Dart Sass already has a node version constraint in it. If someone tries to install it on an incompatible version they'll be told their node version is too old.
sass/package.json:
"engines":{"node":">=14.0.0"}
- πΊπΈUnited States rhovland Oregon
After discussing this with the maintainer on Slack, they would like to migrate to using Webpack for this module and others as they did in another one of their modules
https://git.drupalcode.org/project/varbase_layout_builder/-/blob/10.1.x/... - π¨π¦Canada AaronChristian Kelowna, BC
Yep, we have this internally working with webpack/yarn as well.
I need to find the time to port this over, shouldn't take too long though!