-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Deprecation warning with newest Dart Sass (1.79.2) #311
Comments
I believe a fix / enhancement to the current code that will make use of the newer API can be achieved as follows. In
Then replace the code from line 27:
with the following:
This will introduce the option to pass |
I confirm that @mattyrob's changes work as expected. For anyone else wanting to try it out, replace in your
with
and do a Alternatively, making a call to
in your project's folder will do the change for you in |
I created a fork with the fix from @mattyrob and made it available as a new npm package called grunt-sass-modern so that it feels less hack-ish. |
Updated 2024-Nov-17
Since the author of this repository did not provide a fix and still a lot of projects seem to be relying on it, I decided to fork this repository, add the fix created by Matt Robinson via this commit, and provide information about what can be done to properly update your code and not just silence the warning.
I have also fixed the broken
sourceMap
option.The fork with the fix is called grunt-sass-modern and you will find all the information you need to migrate seamlessly.
Original issue report
With the newest Dart Sass, I am getting
Deprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
According to their docs we can pass this option to silence the warning:
silenceDeprecations: ['legacy-js-api']
(and it does work)So, having something like
does the job of silencing the warning.
They mention that setting an
api
option tomodern
should actually be used instead but setting it has no effect.Help?
The text was updated successfully, but these errors were encountered: