Angular.module minification bug

前端 未结 8 915
情深已故
情深已故 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++
    

提交回复
热议问题