When I tried to get Angular (1.x) working with systemjs, I realized that there is currently no way (I know) to automatically insert $inject components in Angular, which makes the components work even when function arguments are intercepted by the minifier. $inject creating $inject annotations is tedious, error prone, and violates the DRY principle.
There is a mature npm module called ng-annotate that solves this problem and is used in many similar situations for linking. Since I studied SystemJS, I see that there is a plug-in system that includes the ability to translate source code, which is what ng-annotate does.
From what I see, SystemJS gives you the ability to map a specific file extension to a single bootloader, and all sample plugins support the new file type. What I would like to do is post-process output the SystemJS transformation process instead of adding a new file type. It seems that SystemJS should be able to do this because it has a processing pipeline, but I cannot figure out how to properly insert it into it. Right now I am using Browserify to achieve the same effect, but I have a rather complicated set of build tasks and I would like to simplify it using SystemJS if possible.
Other strategies to use ng-annotate in the bootloader pipeline with SystemJS will also be evaluated.
source share