Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Asp.Net MVC4 Bundling & Minification .min.js files excluded from Scripts.Render?

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?

like image 972
Sam Avatar asked Sep 19 '12 02:09

Sam


2 Answers

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);
like image 75
Sam Avatar answered Sep 28 '22 04:09

Sam


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

like image 33
Ifeanyi Chukwu Avatar answered Sep 28 '22 04:09

Ifeanyi Chukwu