You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have our projects on a monorepo setup, and we have both dependencies through projects. We use pnpm to manage dependencies, and the end result is that since sass-loader finds node-sass, it uses it. There's no way to force Dart Sass
Describe the solution you'd like
Have an environment variable USE_DART_SASS=true to let consumers specify the want to use Dart Sass
I've considered remove node-sass from all of the projects, but that's not only too much work, but it also makes my project health dependent on making sure nobody in the future ever adds a node-sass installation, or my app will break.
I've also considered forking and using custom react-scripts, however keeping it in sync with the public one and such seems like a lot of work for this one single option.
christopher-francisco
changed the title
Use an environment variable to use Dart Sass implementation
Let developers explicitly specify Dart Sass implementation through USE_DART_SASS environment variable
Sep 11, 2020
@BenJenkinson yes that's also a solution. I had just assumed CRA may not upgrade sass-loader for a while for reasons similars to "many apps will break", so I went ahead for an alternate solution, but you're correct.
Is your proposal related to a problem?
Currently react-scripts uses
sass-loader@8.0.2
which, according to the README will:sass
is installednode-sass
is installednode-sass
if both are installedWe have our projects on a monorepo setup, and we have both dependencies through projects. We use
pnpm
to manage dependencies, and the end result is that since sass-loader findsnode-sass
, it uses it. There's no way to force Dart SassDescribe the solution you'd like
Have an environment variable
USE_DART_SASS=true
to let consumers specify the want to use Dart SassDescribe alternatives you've considered
I've considered remove node-sass from all of the projects, but that's not only too much work, but it also makes my project health dependent on making sure nobody in the future ever adds a
node-sass
installation, or my app will break.I've also considered forking and using custom react-scripts, however keeping it in sync with the public one and such seems like a lot of work for this one single option.
I've pushed #9629 to show you how it'd look like.
The text was updated successfully, but these errors were encountered: