Disable uglify in Gulpfile

For posterity: The thing in Uglify that breaks angular is the mangler. You can disable mangling in uglify but I would not recommend it. Most of the actual runtime perf benefits of uglifying comes from mangling. So that’s why I recommend using ng-annotate. Definitely always recommend using ngStrictDi if you are on 1.3.

[ngScriptDi] if this attribute is present on the app element, the injector will be created in “strict-di” mode. This means that the application will fail to invoke functions which do not use explicit function annotation (and are thus unsuitable for minification), as described in the Dependency Injection guide, and useful debugging info will assist in tracking down the root of these bugs.

2 Likes