sass-embedded mention in the docs
x9sim9 opened this issue · 4 comments
When upgrading from webpack 4 to 5 my compile time went from 2 seconds to 22 seconds and I almost gave up completely on webpack 5 as it was just unusable for live editing.
Eventually I stumbled on sass-embedded instead of sass which uses the native c++ version of dart which significantly improved compile times down to around 2.5 seconds.
Would it be worth mentioning this in the docs so other people don't struggle with performance issues like I did?
That is a huge boost. I see it more as a detailed blog post with benchmarks rather something in the documentation for Shakapacker.
CC: @Judahmeek
Should something change here: https://github.com/shakacode/shakapacker/blob/master/package/rules/sass.js
I am away from my dev machine until the new year but I will put the gist here in case anyone needs this in the mean time...
Install dart natively on your machine:
https://dart.dev/get-dart
Then use sass-embedded instead of sass
https://github.com/sass/embedded-host-node
I think the project above was originally for node
but all the documentation now shows dart
so ignore the name of the project..
There was no config file changes required to get it to work with shakapacker, thought this might be useful as I almost went back to webpack 4 due to how slow the JS compiled version of dart was for my project.