Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2017 minify on save

Can anyone explain how to minify files on save. The extension Web Essentials used to work perfectly in earlier versions of VS and used to make life easy. Now it just won't work.

I have tried uninstalling and reinstalling the extension but it doesn't work. Right-clicking on the CSS file in the solution gives the option to Re-Bundle file that doesn't work. I have tried building the application after making changes and that doesn't work.enter image description here

Any tips or things to try would be appreciated. I know I can copy the text and minify with other tools but that makes things take longer than they really should.

like image 370
WillNZ Avatar asked Nov 21 '17 22:11

WillNZ


1 Answers

I have found that if the minifier is not working it is because there is an error in my CSS file that is not acceptable to VS.

It is hard to notice because the error only shows in the error list and there is no obvious alert for it like other code errors. I suggest looking to see if there is a CSS error in the error list and then correcting it.

like image 127
Tyson Gibby Avatar answered Sep 24 '22 15:09

Tyson Gibby