0

I have a very simple bundle I wish to include

@Scripts.Render("~/bundles/bjqs")

The bundle config looks like this

bundles.Add(new ScriptBundle("~/bundles/bjqs").Include(
    "~/Scripts/bjqs-1.3.min.js"));

However it just never gets included.

If I manually include it like this

@Scripts.Render("~/Scripts/bjqs-1.3.min.js");

It works, but that defeats the purpose of the bundle.

Help me stack overflow, your my only hope.

Dale Fraser
  • 4,623
  • 7
  • 39
  • 76

1 Answers1

2

Sometimes you may need to clear the IgnoreList,especially if you are including min files in your Bundle.

 bundles.IgnoreList.Clear();

and then Add

bundles.Add(new ScriptBundle("~/bundles/bjqs").Include(
    "~/Scripts/bjqs-1.3.min.js"));

A Good post on this behavior here

Community
  • 1
  • 1
Prabhu Murthy
  • 9,031
  • 5
  • 29
  • 36
  • 1
    yes its sort of weird it will also include if you take out the word "min" from the file name.looks like this is been fixed as being stated here http://stackoverflow.com/questions/13290977/mvc-bundling-include-min-file-for-a-single-bundle – Prabhu Murthy May 04 '13 at 08:37