Taritsyn / BundleTransformer

Bundle Transformer - a modular extension for System.Web.Optimization (also known as the Microsoft ASP.NET Web Optimization Framework).
Apache License 2.0
130 stars 19 forks source link

LibSass Deprecated by Sass #47

Closed filefontaine closed 1 year ago

filefontaine commented 3 years ago

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 ?

Taritsyn commented 3 years ago

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.

HRasch commented 2 years ago

Love to read this :-)

HRasch commented 2 years ago

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.

kgwood39 commented 1 year ago

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?

Taritsyn commented 1 year ago

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.
kgwood39 commented 1 year ago

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 element so it had to be added:

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?

Taritsyn commented 1 year ago

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 commented 1 year ago

Hello!

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