Bundle Transformer: Autoprefixer

BundleTransformer.Autoprefixer contains one postprocessor-adapter for postprocessing of CSS-code - AutoprefixCssPostProcessor. AutoprefixCssPostProcessor is based on the Andrey Sitnik's Autoprefixer version

As a JS-engine is used the JavaScript Engine Switcher library. For correct working of this module is recommended to install the following NuGet packages: JavaScriptEngineSwitcher.Msie, JavaScriptEngineSwitcher.V8 or JavaScriptEngineSwitcher.ChakraCore. After package is installed and JS-engine is registered, need set a name of JavaScript engine (for example, MsieJsEngine) to the name attribute of /configuration/bundleTransformer/autoprefixer/jsEngine configuration element.

To make AutoprefixCssPostProcessor is one of the default CSS-postprocessors, you need to make changes to the Web.config file. In the defaultPostProcessors attribute of \configuration\bundleTransformer\core\css element must be add AutoprefixCssPostProcessor to end of comma-separated list (for example, defaultPostProcessors="UrlRewritingCssPostProcessor,AutoprefixCssPostProcessor").

Additionally, you can specify the browser conditional expressions in the Web.config file (in the Visual Studio supported IntelliSense):

BundleTransformer.Autoprefixer options in the Web.config file

To clean CSS from any vendor prefixes, you just need to add the one conditional expression is equal to none:

<configuration><bundleTransformer xmlns="http://tempuri.org/BundleTransformer.Configuration.xsd"><autoprefixer>
        <add conditionalExpression="none" />

Last edited Apr 14 at 5:56 PM by Taritsyn, version 53