Skip to content
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

Switch to dart-sass from deprecated node-sass #327

Merged
merged 32 commits into from
Dec 11, 2020
Merged

Conversation

calebmshafer
Copy link
Member

@calebmshafer calebmshafer commented Nov 30, 2020

With node-sass now deprecated in favor of dart-sass, updating both the Extension webpack tools and all of our test apps to use it by default.

Per the sass-loader documentation, both are still supported and the node-sass vs. dart-sass is driven based on what is installed as a peer dependency. However the default will remain node-sass until the next major version of the sass-loader package.

fast-sass-loader does not intend to support dart-sass vs. node-sass so I'm removing support completely from our repo. The support for it will remain in our react-scripts fork until we move up to 4.0. Then at that time, depending on performance testing, we can decide to drop it or use the fork someone introduced (see yibn2008/fast-sass-loader#63 (comment))

Some additional details on the deprecation are here, https://sass-lang.com/blog/libsass-is-deprecated

@calebmshafer calebmshafer requested a review from grigasp November 30, 2020 23:01
@calebmshafer calebmshafer changed the title Remove switch to lib-sass from deprecated node-sass Switch to lib-sass from deprecated node-sass Dec 1, 2020
@calebmshafer calebmshafer changed the title Switch to lib-sass from deprecated node-sass Switch to dart-sass from deprecated node-sass Dec 1, 2020
@calebmshafer
Copy link
Member Author

@bsteinbk @GerardasB I'm running into an error in ui-test-app related to this change. Would you mind taking a look?

Failed to compile.

./src/frontend/appui/imodelopen/IModelList.scss
SassError: Expected identifier.
   ╷
39 │     -webkit-transition: color background-color.2s ease;
   │                                                ^
   ╵
  /Users/calebshafer/dev/github/imodeljs/test-apps/ui-test-app/src/frontend/appui/imodelopen/IModelList.scss 39:48  root stylesheet

@calebmshafer calebmshafer requested a review from a team as a code owner December 11, 2020 15:41
@mergify mergify bot requested a review from a team as a code owner December 11, 2020 16:19
@calebmshafer calebmshafer requested a review from a team as a code owner December 11, 2020 16:20
-o-transition: color background-color.2s ease;
-webkit-transition: color background-color .2s ease;
-moz-transition: color background-color .2s ease;
-o-transition: color background-color .2s ease;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsteinbk @GerardasB FWIW, I don't think you should ever need to use these vendor prefixes - I believe create-react-app will add these for you as a post-processing step.

See: https://create-react-app.dev/docs/post-processing-css/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this was the responsibility of scss and one of the main reasons to use it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wgoehrig thanks for letting me know. I should've removed these rules instead of fixing immediate build issue.
Most of these rules were written before we moved to CRA, we will make sure not to add prefixes explicitly anymore and leave that for the tooling.

@calebmshafer calebmshafer merged commit 034f56e into master Dec 11, 2020
@calebmshafer calebmshafer deleted the drop-node-sass branch December 11, 2020 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants