Imagine having an npm package where all components are exported from a single index.js file:
export * from './components/A';
export * from './components/B';
Now consider another package that relies on this initial package:
import {A} from 'my-package';
Would the contents of components/B
be included in the bundle even though they are not used in the consuming package?
Is there any way to avoid this unnecessary bundling?