2

If i bundle my angular scripts, it returns unminified contents. I have both the .js and .min.js in the folder. In Bundle.config i am referring to .js. So BundleTable.EnableOptimizations= true, the error is thrown

* Minification failed. Returning unminified contents.
(80,346-351): run-time error JS1137: 'catch' is a new reserved word and   should not be used as an identifier: catch
(101,246-253): run-time error JS1137: 'finally' is a new reserved word and should not be used as an identifier: finally
(112,331-336): run-time error JS1137: 'catch' is a new reserved word and should not be used as an identifier: catch
(159,309-316): run-time error JS1137: 'finally' is a new reserved word and should not be used as an identifier: finally
(162,133-138): run-time error JS1137: 'catch' is a new reserved word and should not be used as an identifier: catch
(207,467-473): run-time error JS1137: 'delete' is a new reserved word and should not be used as an identifier: delete
(321,504-510): run-time error JS1137: 'delete' is a new reserved word and should not be used as an identifier: delete
(355,374-380): run-time error JS1137: 'delete' is a new reserved word and should not be used as an identifier: delete
(355,440-446): run-time error JS1137: 'delete' is a new reserved word and should not be used as an identifier: delete
(401,10-17): run-time error JS1137: 'finally' is a new reserved word and should not be used as an identifier: finally
(400,468-473): run-time error JS1137: 'catch' is a new reserved word and should not be used as an identifier: catch
/*
AngularJS v1.6.4
(c) 2010-2017 Google, Inc. http://angularjs.org
License: MIT
......

BundleConfig.cs

bundles.Add(new ScriptBundle("~/bundles/angular").Include(
"~/Scripts/lib/angular.js",
"~/Scripts/lib/angular-animate.js",
"~/Scripts/lib/angular-route.js",
"~/Scripts/lib/angular-sanitize.js",
"~/Scripts/lib/angular-touch.js"));

Why is this error only for angular scripts? How do i solve this minification issue?

Sanketh
  • 47
  • 2
  • 10
  • Are you using a build tool? How are you minifying your files? Why not just use already minified files for jquery, angular and bootstrap? – Omri Luzon Apr 29 '17 at 11:49
  • I am using visual studio IDE and MVC application – Sanketh Apr 29 '17 at 16:52
  • Possible duplicate of [MVC4 Bundle minification doesn't work with javascript reserved words](http://stackoverflow.com/questions/13413844/mvc4-bundle-minification-doesnt-work-with-javascript-reserved-words) – Lorenz Meyer Apr 29 '17 at 18:01

0 Answers0