Try to handle this case with 'babel-plugin-angularjs-annotate'. See reproduction here
Expected: $location is properly annotated
Actual: $location is renamed to _$location by @babel/plugin-proposal-class-properties transformer. Then babel-plugin-angularjs-annotate fails to handle it:
Possible solution: maybe babel-plugin-angularjs-annotate can automatically detect that argument was renamed with adding "_" and rename it back when constructing $inject?
babel/preset-env
Expected:
$location
is properly annotated Actual:$location
is renamed to_$location
by@babel/plugin-proposal-class-properties
transformer. Thenbabel-plugin-angularjs-annotate
fails to handle it:Possible solution: maybe
babel-plugin-angularjs-annotate
can automatically detect that argument was renamed with adding "_" and rename it back when constructing $inject?