I'm using ASP.Net MVC 4 - and attempting to use Toastr too.
I installed it via NuGet - and it works in development, however, when I publish, my Javascript "bundle" reports:
/* Minification failed. Returning unminified contents.
(9908,1-2): run-time warning JS1002: Syntax error: }
*/
/*!
* jQuery JavaScript Library v1.8.3
* http://jquery.com/
My bundle file is:
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"
));
}
}
}
If I take Toastr out from the bundle above, everything else works fine.
Any idea how I can resolve this problem please?
Thanks, Mark