asp.net mvc exclude css file from bundle

xurca picture xurca · Dec 21, 2012 · Viewed 9.5k times · Source

I have such bundle

bundles.Add(new StyleBundle("~/Content/themes/default/css")
       .IncludeDirectory("~/Content/themes/Default", "*.css"));

but I want to exclude one CSS file from it.

Is it possible to make this without specifying each CSS file in bundle?

Answer

CoffeeCode picture CoffeeCode · Dec 21, 2012

Try using IgnoreList.Ignore; bundles.IgnoreList.Ignore(...).