BundleTransformer icon indicating copy to clipboard operation
BundleTransformer copied to clipboard

LibSass Deprecated by Sass

Open filefontaine opened this issue 3 years ago • 3 comments

Hello,

i have see that LibSass is know Deprecated and Sass recommanded to use DartSass instead. https://sass-lang.com/blog/libsass-is-deprecated

(and Bootstrap 5 recommand DartSass )

I wanted to know if you have any plans to add compatibility for dartSass on BundleTransformer.SassAndScss ?

filefontaine avatar Mar 22 '21 14:03 filefontaine

Hello, Antoine!

I've known about this for a long time, so I started working on the Sass Host project. While work on this project is stopped, but I will return to it as soon as I have free time.

Taritsyn avatar Mar 22 '21 16:03 Taritsyn

Love to read this :-)

HRasch avatar Jun 14 '22 11:06 HRasch

Now Bootstrap 5.2 is released and uses some calc-functions that can't be compiled with LibSass anymore :-( Is this issue still on progress? In my tests DartSass was up to 10 times slower, what is not acceptable for a "runtime-compiling" stylesheet.

HRasch avatar Aug 27 '22 14:08 HRasch

Is it possible to include the DartSass project with the BundleTransformer? I am attempting to use BootStrap 5.2 Scss files in my project but it won't compile with the existing BundleTransformer.SassAndScss adapter. Would love to see progress in this direction?

kgwood39 avatar Dec 08 '22 18:12 kgwood39

Hello, Kevin!

For now, use the BundleTransformer.SassAndScss package from version 1.13.0 Preview 3. To use a more recent version of Sass, simply update the DartSassHost package.

Steps required to update the BundleTransformer.SassAndScss module to version 1.13.X:

  1. Update the BundleTransformer.SassAndScss package to latest preview version.
  2. Uninstall the LibSassHost and LibSassHost.Native.* packages if necessary.
  3. Remove the precision and sourceComments attributes from the /configuration/bundleTransformer/sassAndScss configuration element in the Web.config file.
  4. Install one of the following packages: JavaScriptEngineSwitcher.Msie (only in the Chakra “Edge” JsRT mode), JavaScriptEngineSwitcher.V8 or JavaScriptEngineSwitcher.ChakraCore.
  5. Register a JS engine.
  6. Set a name of JS engine (for example, MsieJsEngine) to the name attribute of /configuration/bundleTransformer/sassAndScss/jsEngine configuration element in the Web.config file.

Taritsyn avatar Dec 08 '22 18:12 Taritsyn

Wow! Thank you for the fast response. I very much appreciate all of your efforts in this area over the years.

With your assistance, I was able to get it to work with Framework 4.8 and the ChakraEngine. There was no <sassAndScss> element so it had to be added: <sassAndScss> <jsEngine name="ChakraCoreJsEngine"/> </sassAndScss>

Both BundleTransformer.SassAndScss and DartSassHost are in the preview phase and have been for some time (12/11/2021!!). I see your commits from today of the DartSassHost. Fantastic.

So many people could benefit from having a working DartSaasHost in the .Net space. What more needs to be done to make this a release and is there anything I can do to help?

kgwood39 avatar Dec 08 '22 22:12 kgwood39

What more needs to be done to make this a release and is there anything I can do to help?

If nothing unexpected happens, then I will make a stable release next week.

Taritsyn avatar Dec 09 '22 06:12 Taritsyn

Hello!

First stable release of the BundleTransformer.SassAndScss with Dart Sass support was released yesterday.

Taritsyn avatar Dec 19 '22 17:12 Taritsyn