使用SquishIt合并js文件没有效果?
@{
ViewBag.Title = "Home Page";
SquishIt.JavaScript.Add(
Url.Content("~/Scripts/jquery_ui.js"),
Url.Content("~/Scripts/jquery_1.4.4.js")
);
}
@SquishIt.JavaScript.Render(Url.Content("~/Scripts/min.js"))
它显示如下:
<script type="text/javascript" src="/Scripts/jquery_ui.js"></script>`
<script type="text/javascript" src="/Scripts/jquery_1.4.4.js"></script>`
“min.js”在哪里?
这两个js文件不是合并成一个名为min.js的js吗?
谢谢!
@{
ViewBag.Title = "Home Page";
SquishIt.JavaScript.Add(
Url.Content("~/Scripts/jquery_ui.js"),
Url.Content("~/Scripts/jquery_1.4.4.js")
);
}
@SquishIt.JavaScript.Render(Url.Content("~/Scripts/min.js"))
It shows like this:
<script type="text/javascript" src="/Scripts/jquery_ui.js"></script>`
<script type="text/javascript" src="/Scripts/jquery_1.4.4.js"></script>`
Where is "min.js"?
The two js files are not combine into one js named min.js?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

为了帮助调试,SquishIt 在调试模式下不会对文件执行任何操作。
但是,您可以在
.Render(...)
调用之前添加.ForceRelease()
调用,以强制它合并文件,就像处于发布模式一样:To help with debugging, SquishIt does not do anything to the files when in debug mode.
However, you can add a
.ForceRelease()
call before the.Render(...)
call to force it to combine the files as if it's in release mode: