-
Notifications
You must be signed in to change notification settings - Fork 1.5k
dart sass instead of node-sass #2914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hey, @simonoff ! 👋 Thanks for contribution! Can you share with us the reason behind the suggestion to switch from node-sass to dart-sass? Is there some bug related to this change, that dart-sass fix it? Thank you 🤝 🍻 |
Hello @pedrofurtado ! Thank you for review.
Secondly right now node-sass requires an installing python to make a node-gyp for arm64 and Node.js 14.x which is required additional time to build docker container on Apple M1. Also, |
@simonoff Thank you so much for feedback! 🤝 I didn't know that node-sass was deprecated. Thanks for notify us! After your response, I searched and found some articles about it, just like this one: https://sass-lang.com/blog/libsass-is-deprecated Is better to move to dart-sass. Pinging @gauravtiwari @guillaumebriday for some more eyes/reviews on it 👓 As I searched, the API exposed by node-sass is the same of dart-sass, to turn the migration more easy. Our tests are all green (except some of them, but is not related with this PR), so I think we are ready to merge ✅ |
Is there a way to manually use this patch without waiting for the corresponding 5.x release? This is really holding us up. Happy to help however we can. |
I've manually replaced node-sass with dart sass on webpacker 5.2.1. Maybe this will work for you as well. Add dart sass to your Rails app's
Modify ["sass", "moduleSass"].forEach((loader) => {
const sassLoader = environment.loaders
.get(loader)
.use.find((el) => el.loader === "sass-loader");
sassLoader.options.implementation = require("sass");
}); |
LGTM |
@mattbrictson thanks so much this got me a lot closer however when I do But if I spell the use path incorrectly, like Happy to open a separate issue for this but figured this would be helpful for other people who ended up here |
I think this is an unrelated issue. Just guessing, |
@mattbrictson thanks again -- switching to update: when using material, apparently the only way to import stuff is by doing |
can we get this node-sass replacement in for 5.3 along with other security updates? cc @gauravtiwari |
I believe this can be closed as it has been released in 5.2.2: https://github.com/rails/webpacker/blob/5-x-stable/CHANGELOG.md#522---2021-04-27. |
Could you fix conflicts please? @simonoff thanks 🙏 |
So has it actually been released in 5.2.2? |
Yes there are available releases with dart sass |
It's been done here, thanks @simonoff |
Feel free to reopen this PR here: |
No description provided.