Correct, that will happen. It does beg the question of why you have modules that you aren’t using and do not want in the bundle. You may consider putting other, non-bundled modules, like test utilities, in another folder. I maintain a test-utils directory much the same way I maintain a components, hooks, and utils directory. These utilities are never imported in the production application, and therefore are not at risk of being included in the final bundle.

Senior front end engineer /

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store