Why is my css not getting rated?

I do not understand what I am missing here. As far as I can tell, I followed the instructions here . But my css package still doesn't get the grade.

Here is my RegisterBundles code:

 public static void RegisterBundles(BundleCollection bundles) { bundles.UseCdn = true; BundleTable.EnableOptimizations = true; bundles.Add(new ScriptBundle("~/bundles/otherjquery").Include( "~/App_Themes/Travel2/Script/jquery-ui.min.js", "~/Scripts/jquery.validate.unobtrusive.js", "~/Scripts/jquery.unobtrusive-ajax.js")); Bundle availabiltyResult = new StyleBundle("~/bundles/css/availabiltyResult").Include( "~/CSS/Travel2/Air.css", "~/CSS/Travel2/Air/AvailabiltyResults.css" ); availabiltyResult.Transforms.Add(new CssMinify()); bundles.Add(availabiltyResult); } 

I disabled debugging in my web.config by removing <compilation debug="true"> . I see js getting bundled and minimized:

enter image description here

but css gets bundled but not minimized:

enter image description here

What am I missing here?

+5
source share
2 answers

The problem was that there was a file that was reduced, but FireBug was revising the code so it seemed like it wasn’t. Looking at it with Fiddler I can see that css (actually) gets minified:

enter image description here

Kudos to @Kimi for defining it.

+1
source

You should build your code as Release .

-1
source

Source: https://habr.com/ru/post/1212821/


All Articles