-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Use the modern Sass API #9857
Comments
I was able to migrate our code to use the new API in #9966, but I'm worried that this might be a breaking change for end users. Projects may include a |
You could probably make a shim for the legacy Since the legacy API has been deprecated for years now, we're planning to drop support in Dart Sass 2.0.0 which will probably be released some time in Q1 2025. At that point, we unfortunately won't have the bandwidth to keep making CSS compatibility changes to the 1.x line. |
I don't know what changed but from one day to another I started getting a hell of:
I refactored all my code to use the new I tried everything to fix it and wasn't able; I think that this issue is what is missing, parcel needs support for the new stuff, I guess sooner or later will be there, for now, and I comment this for others going trough the same, the solution was simple: keep everything as it was, dont refactor anything and just add:
in the package.json no more warnings or anything, just kept my sass the old-school way and everything keeps working fine. for some reason even if parcel has 1.38.0 as dependecy, the installed version was 1.8x. |
@valentinoConti I strongly recommend passing the |
Sounds good, will do, thanks! hope that parcel updates support for newest stuff soon 🙌🏼 |
I'm still not exactly sure how we can do that without waiting for a major version of Parcel. Maybe there's a way to detect if a config is compatible with the new or old version of sass and load the corresponding version? |
Yeah, that should work. There's very little overlap between the legacy options and the modern options, so you should mostly be able to just look for any keys that are only in the latter and use the modern options otherwise. There are only two keys that are valid in both options without having identical semantics:
That said, even with the |
Any plan to release a new version of parcel? Or do we need to wait for 3.0? I see that the last time we released a new version is 8 months ago. |
Yes, working on that, aiming for within the next week or so. Sorry for the delay. |
Parcel currently uses the deprecated legacy API for compiling Sass code. This API is less efficient and less correct than the modern API, and is slated to be removed in an upcoming Dart Sass 2.0.0 release. In order to encourage users to migrate away before that, we'll be adding a deprecation warning to all uses of the legacy API in one of the next few Sass releases.
Also consider adding support for the
sass-embedded
package, and particularly theCompiler
API. When doing multiple small compilations, this API on the embedded host is much faster than the plain-JSsass
package.The text was updated successfully, but these errors were encountered: