-
Notifications
You must be signed in to change notification settings - Fork 47
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
build(sass): migrate from node-sass to dart sass #455
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @Hopkinsa! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great @Hopkinsa cheers!
My only minor comment is that I wondered if thetype
changes should be in a separate commit? I think that they are unrelated to the dart sass upgrade, but they are definitely valuable.
Having them in a separate commit would just give us the opportunity to document the reason in the commit message, and maybe link out to that SO post. Apologies for the fussiness!
Agreed - got caught up in the moment removing warnings |
Great idea, I think having the SO link in the long description part of the message will be great 👍 |
The root cause is in Typescript and transpilation. Once TypeScript code is transpiled, interfaces/types are gone. They don't exist anymore in the emitted files. https://stackoverflow.com/questions/40841641/cannot-import-exported-interface-export-not-found
LibSass and Node Sass are deprecated. While they will continue to receive maintenance releases indefinitely, there are no plans to add additional features or compatibility with any new CSS or Sass features. Projects that still use it should move onto Dart Sass https://sass-lang.com/blog/libsass-is-deprecated fix Legal-and-General#452
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one @Hopkinsa, thanks for breaking those commits up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @Hopkinsa!
🎉 This PR is included in version 6.4.4 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Description
LibSass and Node Sass are deprecated. While they will continue to receive maintenance releases indefinitely, there are no plans to add additional features or compatibility with any new CSS or Sass features. Projects that still use it should move onto Dart Sass.
This will result is a compile warning - DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Therefore, as part of update to Dart also update Sass to use math.div
During the migration, additional warnings were also observed i.e.
From stackoverflow (https://stackoverflow.com/questions/40841641/cannot-import-exported-interface-export-not-found)
The root cause is in Typescript and transpilation. Once TypeScript code is transpiled, interfaces/types are gone. They don't exist anymore in the emitted files.
While the types are erased, the imports/exports aren't necessarily. The reason is that there are ambiguities and that the compiler doesn't always know for sure whether something that is exported is a type or a value.
To correct these errors, 'type' was added to some interface imports
Fixes #452