Created by: christopher-francisco
Description
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. See #9628 for the complete use case
Testing strategy
Manually tested it by doing the following
- Created a new app with
yarn create-react-app my-app
- Added a few sass files with
@use
directive (only supported by Dart Sass) - Added
sass
dependnecy - Ran
yarn start
. Comiplation succeeded - Added
node-sass
dependency (we now have both) - Ran
yarn start
. Compilation failed - Ran
USE_DART_SASS=true yarn start
. Comiplation succeeded
Screenshot
You can see both sass
and node-sass
installed at the bottom right corner. App started with USE_DART_SASS=true yarn start
What's Missing?
-
Find a way to automate a test similar to the one described above -
Updating documentation
Closes #9629