Angular.module minification bug

前端 未结 8 859
情深已故
情深已故 2020-11-28 03:50

Having the darnedest time trying to figure out why minification is not working.

I have injected via an array object my providers prior the function per numerous sugg

相关标签:
8条回答
  • 2020-11-28 04:20

    This is very difficult to debug because a lot of services are named the same (mostly e or a). This will not solve the error, but will provide you with the name of the unresolved service which enables you to track down, in the uglified output, the location in the code and finally enables you to solve the issue:

    Go into lib/scope.jsof Uglify2 (node_modules/grunt-contrib-uglify/node_modules/uglify-js/lib/scope.js) and replace the line

    this.mangled_name = this.scope.next_mangled(options);
    

    with

    this.mangled_name = this.name + "__debugging_" + counter++
    
    0 讨论(0)
  • 2020-11-28 04:23

    AndrewM96 suggestion of ng-min is right.

    The alignment and white space matters to Uglify as well as Angular.

    0 讨论(0)
提交回复
热议问题