Reputation: 590
Consider the following scenario:
I use Web Essentials, thus my .less files get compiled into .css, .map en -min.css files. I also use MVC StyleBundles.
Expectation: In release builds, the StyleBundle "handler" bundles and minifies all the .css files defined in the bundle. (not the .min files)
Actual result: In release builds, the StyleBundle "handler" does bundle, but uses the .min files generated by Web Essentials, if found. Else wise is minifies the .css itself.
Can I configure the "handler" to ignore the generated .min files and always minify the .css files itself?
Deleting all present .map en -min.css files and generating a solution-wide Web Essentials setting in which I disable the generation of minified files and is not a feasible solution in my team.
Thanks!
Upvotes: 0
Views: 1347
Reputation: 530
A quick and easy solution to this would be the following:
Web Essentials allows you to create a solution-wide settings file that can be checked into your version control system.
The option to create this file is under the Web Essentials menu that gets added when it gets installed.
Note: Some plugins may conflict with this and I've had one PC where the Web Essentials menu was missing even after several attempts to re-install.
After you click this, it will create a file WebEssentials-Settings.json
in your solution directory where you can customize settings that will get used by all of your team members when they load up the solution the next time.
To disable the automatic minification LESS files, just change the CompileOnBuild
, CompileOnSave
, and MinifyInPlace
settings to false.
Upvotes: 1