我正在使用 ASP.Net MVC 4 - 并尝试使用 Toastr。
我通过 NuGet 安装了它——它在开发中工作,但是,当我发布时,我的 Javascript“捆绑”报告:
/* Minification failed. Returning unminified contents.
(9908,1-2): run-time warning JS1002: Syntax error: }
*/
/*!
* jQuery JavaScript Library v1.8.3
* http://jquery.com/
我的捆绑文件是:
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
namespace BootstrapSupport
{
public class BootstrapBundleConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/js").Include(
"~/Scripts/jquery-1.10.1.js",
//"~/Scripts/jquery-migrate-{version}.js",
"~/Scripts/bootstrap.js",
"~/Scripts/jquery.validate.js",
"~/scripts/jquery.validate.unobtrusive.js",
"~/Scripts/jquery.validate.unobtrusive-custom-for-bootstrap.js",
"~/Scripts/jquery.tablesorter.js",
"~/Scripts/toastr.js",
"~/Scripts/mt.js"
));
bundles.Add(new StyleBundle("~/content/css").Include(
"~/Content/bootstrap.css",
"~/Content/body.css",
"~/Content/bootstrap-responsive.css",
"~/Content/bootstrap-mvc-validation.css",
"~/Content/style.css",
"~/Content/toastr.css"
));
}
}
}
如果我从上面的包中取出 Toastr,其他一切都正常。
知道如何解决这个问题吗?
谢谢,马克