Minified script only in MVC4 BundleConfig

一笑奈何 提交于 2019-12-05 02:16:06

This behavior has been improved (fixed) in the 1.1.0-alpha1 release. We moved all of the old default ignore list entries into a new DirectoryFilter ignore list that are only used when including search patterns like *.js which was the origional intent for this functionality. As a result this should no longer be an issue when you are including individual files explicitly.

Note: the one place this might still be an issue is if you try to include something like jquery-{version}.min.js.

There is ignoreList, which you can clear if you need, it looks like:

public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
{
    if (ignoreList != null)
    {
        ignoreList.Ignore("*.intellisense.js");
        ignoreList.Ignore("*-vsdoc.js");
        ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
        ignoreList.Ignore("*.min.js", OptimizationMode.WhenDisabled);
        ignoreList.Ignore("*.min.css", OptimizationMode.WhenDisabled);
        return;
    }
    else
    {
        throw new ArgumentNullException("ignoreList");
    }
}

More details: Advanced Options of ASP.NET Bundling and Minification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!