Non-imported files included in bundle

I’m working on an Ember project and I’ve been looking into reducing our production bundle size. We use ember-auto-import and ember-cli-babel in our setup.

I used ember-cli-bundle-analyzer and found that files that contain an export but aren’t imported anywhere is included in our bundle. I’ve haven’t been able to find much information about this issue, and I’m wondering now if this is just how ember-cli works or if it’s an issue with our setup. Any insight would be much appreciated.

Are these files from ember addons or other packages? IIRC ember addons currently get bundled in their entirety, but ember-auto-import should be smarter about that for non ember packages? One of the driving motivators behind the embroider project (ember’s next gen build system) is to take advantage of great js ecosystem build tools like webpack so that it will support tree shaking (as well as other fun things like route based code splitting etc).