Great explanation, but I think introducing ‘internal’ might have performance issue with webpack and…
brickman jim

That is correct, but two notes:

  1. webpack doesn’t do any actual treeshaking yet (yeah, I always assumed it did so far)
  2. but to enable tree shaking, you could limit the pattern to those files affected by circular deps (since circulary dependend files will either both or not at all appear in the output). This does make the process more error prone though. But doing that can also be beneficial for code splitting and such.