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

后端 未结 2 792
余生分开走
余生分开走 2021-01-02 15:59

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 con

2条回答
  •  太阳男子
    2021-01-02 16:11

    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);
    

提交回复
热议问题