MVC捆绑 - 包括一个包.min文件 [英] MVC Bundling - Include .min file for a single bundle
问题描述
我在我的应用程序的单个文件,我只有一个缩小的版本,我想创建一个包吧:
I have a single file in my application that I only have a minified version of and I would like to create a bundle for it:
bundles.Add(new ScriptBundle("~/bundles/maskedinput").Include(
"~/Scripts/jquery.maskedinput-1.3.min.js"));
的问题是,默认在调试模式下,捆扎机构忽略.min文件。我并不想关闭该规则对所有包,但我想禁用它为这一个包。这可能吗?
The problem is that by default in debug mode, the bundling mechanism ignores .min files. I don't want to turn off this rule for all bundles, but I would like to disable it for this single bundle. Is this possible?
推荐答案
一个快速解决方案是重命名js文件取出.min。或根据在这个环节的解决方案,您可以创建自己的忽略模式。
A quick fix is to rename the js file taking out .min. Or as per the solution in this link you can create your own ignore patterns.
<一个href=\"http://stackoverflow.com/a/12005272/1593273\">http://stackoverflow.com/a/12005272/1593273
这篇关于MVC捆绑 - 包括一个包.min文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!