0

I am using bundling included in the asp.net web optimizations, and there is a single .js file that is located in my directory that I want to ignore.

Right now I'm doing:

bundles.Add(new ScriptBundle("~/bundles/content")
    .IncludeDirectory("~/Content/src", "*.js", true));

I would like to exclude app.js from this. How can I tell the IncludeDirectory to ignore this file?

Maxime Rouiller
  • 13,614
  • 9
  • 57
  • 107
Scottie
  • 11,050
  • 19
  • 68
  • 109

1 Answers1

0

I found the solution...

bundles.IgnoreList.Ignore("app.js");

You can also use this with wildcards.

https://msdn.microsoft.com/en-us/library/system.web.optimization.bundlecollection.ignorelist%28v=vs.110%29.aspx

Scottie
  • 11,050
  • 19
  • 68
  • 109