injectable
injectable copied to clipboard
Add generateForEnvironments option
Tree shaking is critically important in large-scale projects. I was reading #181 and the last proposition in the conversation sounded reasonable, so I implemented it by adding a generateForEnvironment parameter to the InjectableInit constructor. That allows us to create an initDI function per environment or set of environments (I've added a configDevInjector in the example to illustrate what the user experience might look like). A similar idea was mentioned in #191. From what I see, it fixes #181.
What do you think of this approach?