injectable icon indicating copy to clipboard operation
injectable copied to clipboard

Add generateForEnvironments option

Open olexale opened this issue 1 year ago • 0 comments

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?

olexale avatar May 05 '24 20:05 olexale