gpt4 book ai didi

ASP.NET Bundles 如何禁用缩小

转载 作者:行者123 更新时间:2023-12-03 04:13:46 27 4
gpt4 key购买 nike

我的 web.config(s) 中都有 debug="true",我只是不想缩小我的包,但我似乎什么也没做禁用它。我尝试过 enableoptimizes=false,这是我的代码:

//Javascript
bundles.Add(new ScriptBundle("~/bundles/MainJS")
.Include("~/Scripts/regular/lib/mvc/jquery.validate.unobtrusive.js*")
.Include("~/Scripts/regular/lib/mvc/jquery.validate*")
.Include("~/Scripts/regular/lib/bootstrap.js")
.IncludeDirectory("~/Scripts/regular/modules", "*.js", true)
.IncludeDirectory("~/Scripts/regular/pages", "*.js", true)
.IncludeDirectory("~/Scripts/regular/misc", "*.js", true));

//CSS
bundles.Add(new StyleBundle("~/bundles/MainCSS")
.Include("~/Content/css/regular/lib/bootstrap.css*")
.IncludeDirectory("~/Content/css/regular/modules", "*.css", true)
.IncludeDirectory("~/Content/css/regular/pages", "*.css", true))

最佳答案

条件编译指令是你的 friend :

#if DEBUG
var jsBundle = new Bundle("~/Scripts/js");
#else
var jsBundle = new ScriptBundle("~/Scripts/js");
#endif

关于ASP.NET Bundles 如何禁用缩小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11944745/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com