eleventy-plugin-sass
eleventy-plugin-sass copied to clipboard
Built a plugin to switch to Dart Sass
Hi! Sorry I couldn't get your plugin to work, but if it helps you repair this one, I built a new plugin constructed with Dart-Sass which is the new working way to handle Sass building.
Here it is! Eleventy Plugin Dart-Sass
Hopefully this would be addressed via #32 as well (for those of us who may prefer the API and configuration capabilities of this particular plugin). I guess the main issue right now is just that it's not being updated. 😕
Regarding your particular version: Maybe it was just me being new to 11ty (and not new to SCSS), it was pretty surprising to see that there was no way to just have multiple output *.css files but instead having it channeled into a single input .sass/.scss file with only a single output .css file. Especially with the nomenclature inversed from the convention (i.e. entrypoints as name.scss with includes being prefixed like _included.scss and etc). In this case I generally prefer my compiler to allow me to define a simple input directory and output directory, which seems pretty intuitive and easy in this particular plugin (e.g. just override the watch to point to my specific ['src/_scss/**/*.{scss,sass}'] and then have it dump the resulting *.css files in the correct location).
I see that eleventy-plugin-dart-sass has some potentially useful extra functionality that allows automatically injecting that stylesheet into front-end templates, however. But again, maybe me just being new to 11ty, that's easy enough for me to plug in manually myself, so I didn't see much benefit in that, so it really wasn't worth the tradeoff for me. 🤔
Actually, scratch what I said above. Without going into too much detail (see #34 and this comment if you want that): If you're going to be using 11ty to compile your Sass, your plugin @AramZS is probably still the best way to go for now based on what's out there (given it's relatively up-to-date).
Otherwise, if you want to use 11ty to only partially compile just Sass to CSS as well as perform full builds, look somewhere else. I'll be dropping this extension in favor of something like gulp instead (per sage advice in https://github.com/11ty/eleventy/issues/817). 😅