How to prevent Ngrx Feature modules from ending up in main.js for Angular?

35 Views Asked by At

We're trying to optimize the bundle sizes for our very feature rich Angular app. We use @ngrx/store for state management.

I've been around the block a few times - We're already using feature modules properly, they're in lazy loaded routes. However, sometimes feature A and feature B, both use feature C's StoreModule.

These StoreModules (Where it is shared between two separate lazy features) end up in the main.js bundle.

What magic must I work to expel them from main.js?

0

There are 0 best solutions below