我们正在开发一个大型ASP.net MVC 4 + Angular应用程序。在过去的几个月中,缩小/捆绑似乎已经破裂。
这是我们收到的错误:
/* Minification failed. Returning unminified contents.
(27211,145-152): run-time error JS1019: Can't have 'break' outside of loop: break a
*/
我已将错误追踪到ngAnimate,我们正在使用https://code.angularjs.org/1.3.9/angular-animate.min.js
中的缩小版本这就是我们BundleConfig.cs中的BundleScripts方法的样子:
bundles.Add(new ScriptBundle("~/bundles/app.js").Include(
"~/Content/js/vendor/modernizr-2.8.3/modernizr.js",
"~/Content/js/vendor/jquery-1.11.1/jquery.min.js",
"~/Content/js/vendor/angular-1.3.9/angular.min.js",
"~/Content/js/vendor/angular-1.3.9/i18n/angular-locale_sv-se.js",
"~/Content/js/vendor/angular-1.3.9/angular-animate.min.js",
"~/Content/js/vendor/angular-1.3.9/angular-touch.min.js",
"~/Content/js/vendor/fastclick/lib/fastclick.js",
"~/Content/js/vendor/ui-bootstrap-2.4.0/ui-bootstrap-tpls.js")
.Include("~/Content/js/vendor/clipboardjs-1.6.1/clipboard.min.js")
.Include("~/Content/js/vendor/ngclipboard-1.1.1/ngclipboard.min.js")
.IncludeDirectory("~/Content/js/vendor/ui-bootstrap-2.4.0-sb", "*.js", true)
.Include("~/Content/js/runfirst.js")
.IncludeDirectory("~/Content/js/app", "*.js", true)
.Include(ClientJsConfig.BundlePath));
我尝试过的事情:
我想避免的事情:
这可能是此版本框架中的错误吗? 您建议使用什么解决方案来解决此错误?
感谢任何帮助!