I have a weird issue with the mvc4 bundler not including files with extension .min.js(我有一个奇怪的问题,mvc4捆绑包不包括扩展名为.min.js的文件)
In my BundleConfig class, I declare(在我的BundleConfig类中,我声明了)
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/Scripts/jquery")
.Include("~/Scripts/jquery-1.8.0.js")
.Include("~/Scripts/jquery.tmpl.min.js"));
}
In my view, I declare(在我看来,我宣布)
<html>
<head>
@Scripts.Render("~/Scripts/jquery")
</head><body>test</body>
</html>
And when it renders, it only renders(当它呈现时,它只会呈现)
<html>
<head>
<script src="/Scripts/jquery-1.8.0.js"></script>
</head>
<body>test</body>
</html>
If I rename the jquery.tmpl.min.js to jquery.tmpl.js (and update the path in the bundle accordingly), both scripts are rendered correctly.(如果我将jquery.tmpl.min.js重命名为jquery.tmpl.js(并相应地更新bundle中的路径),则会正确呈现这两个脚本。)
Is there some config setting that is causing it to ignore '.min.js' files?(是否有一些配置设置导致它忽略'.min.js'文件?)
ask by Fatal translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…