如果我做是腳本/主頁捆綁的保留名稱?
//BundleConfig.cs
bundles.Add(new ScriptBundle("~/Scripts/Home").Include("~/Scripts/Home/Home.js"));
//index.cstml
@section scripts
{
@Scripts.Render("~/Scripts/Home")
}
那麼腳本是不會在釋放模式得到呈現,它在正常工作調試模式沒有
BundleTable.EnableOptimizations = true;
但是如果我做
個//BundleConfig.cs
bundles.Add(new ScriptBundle("~/bundles/Home").Include("~/Scripts/Home/Home.js"));
//index.cstml
@section scripts
{
@Scripts.Render("~/bundles/Home")
}
然後正常工作在調試和發佈模式。
是Scripts/Home
保留名稱或其他?
注:我沒有別的命名爲~/Scripts/Home
在BundleConfig.cs