-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Allow specifying Dart Sass implementation #9629
base: main
Are you sure you want to change the base?
Allow specifying Dart Sass implementation #9629
Conversation
For cases where you're not able to completely remove `node-sass`, causing `sass-loader` to pick it up, you can now explicitly specify you want to use Dart Sass through `USE_DART_SASS=true` env variable.
4d3d689
to
9c26cc5
Compare
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Is there a chance to make it default in version 4.0 which is coming soon? Dart-sass (or just sass, since it is transpiled to pure JS anyway) supports more features and should be used whenever you need sass, except some exotic use-cases. |
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
|
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
This is not stale |
Description
For cases where you're not able to completely remove
node-sass
, causingsass-loader
to pick it up, you can now explicitly specify you want to use Dart Sass throughUSE_DART_SASS=true
env variable. See #9628 for the complete use caseTesting strategy
Manually tested it by doing the following
yarn create-react-app my-app
@use
directive (only supported by Dart Sass)sass
dependnecyyarn start
. Comiplation succeedednode-sass
dependency (we now have both)yarn start
. Compilation failedUSE_DART_SASS=true yarn start
. Comiplation succeededScreenshot
You can see both
sass
andnode-sass
installed at the bottom right corner. App started withUSE_DART_SASS=true yarn start
What's Missing?
Closes #9629