You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the only way to really fix this is to go down the same route as angularJS and have a separate array that can be defined that holds strings of what each argument should be called. The main problem is then that these properties will be defined on the object at run time and if you try to access them then the minifier may rename those unless you use square brackets notation to access the properties.
I know with Closure compiler you can export symbols to let the compiler know not to rename certain properties, not sure what uglify does though
As @rhysbrettbowen commented, AngularJS guys solve this by defining the arguments in a separate array ( so that the annotate function that looks up the function arguments returns this array instead of the actual arguments which are minified and meaningless ). However, having to manually type these arguments for each method adds a lot of boilerplate.
One solution that I think could work is to write a grunt task that needs to be run before minification that fills those arrays automatically.
When you define a class like so:
...those names will be changed upon minification (say with
uglifyjs -m
), and will not work as intended anymore.I don't think there's any easy way to fix this, unfortunately.
The text was updated successfully, but these errors were encountered: