8

I created some theme HtmlHelper extensions for that grab the .css and .js files in a theme directory and dynamically register them as bundles. However, if the theme only contains .min.js files, the Scripts.Render output is empty in debug mode.

Is there a way to include *.min.js files in the output for Scripts.Render when in debug mode?

Sam
  • 9,933
  • 12
  • 68
  • 104

2 Answers2

15

Figured it out.

BundleTable.Bundles.IgnoreList.Clear(); // apparently, IgnoreList included .min.js in debug
BundleTable.Bundles.IgnoreList.Ignore(".intellisense.js", OptimizationMode.Always);
BundleTable.Bundles.IgnoreList.Ignore("-vsdoc.js", OptimizationMode.Always);
BundleTable.Bundles.IgnoreList.Ignore(".debug.js", OptimizationMode.Always);
Sam
  • 9,933
  • 12
  • 68
  • 104
1

Faced same problem earlier......all i did was to upgrade the asp.net web optimization to the latest alpha version.

Ifeanyi Chukwu
  • 3,187
  • 3
  • 28
  • 32
  • this crashed mine on dev machine had to add this `bundles.DirectoryFilter.Clear();` to BundleConfig.cs fiel to fix dev machine, this however did not fix my live machine yet – Don Thomas Boyle Aug 21 '13 at 15:33