<h1 dir="auto">Bug report</h1>
<p dir="auto">I made a repo here that shows all those behaviors, for making things easier I will use the names of the files from this repo. (click and press up/down/left/right to load everything dynamically).<br>
<a href="https://github.com/Inateno/webpack4-full-dynamic">https://github.com/Inateno/webpack4-full-dynamic</a></p>
<p dir="auto"><strong>What is the current behavior?</strong></p>
<ol dir="auto">
<li>
<p dir="auto">Let's take dynamics module, Left, Down, both are using "Base". Base is included in both files.</p>
</li>
<li>
<p dir="auto">Empty is using Left, we call Empty on the click during the execution, which include Left and Base sources, then we press Left key, this now download the Left bundle (but we already loaded this bundle while downloading Empty)..</p>
</li>
</ol>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">For me, 2 options are acceptable.</p>
<ol dir="auto">
<li>
<p dir="auto">include "Base" in the main chunk, actually to bypass the current behavior I include it in my main js file (this works but it's not cool).</p>
</li>
<li>
<p dir="auto">create automatically a new chunk, it will be loaded when we call a module that require it (A,B,C or whatever).</p>
</li>
</ol>
<p dir="auto">Specific problem for Empty requiring Left:</p>
<p dir="auto">This one is probably the easier to fix, when we download Empty, Left source is included, so the tree-shaking should "know" this Left dependency and it shouldn't ask for a download since it's already loaded in memory.</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version:  4,25,1 (check the package for more)<br>
Node.js version: latest<br>
Operating System: Mac OS 10,14 (but replicated on win8 to)<br>
Additional tools: typescript, babel conf, webpack-dev-server</p>
<p dir="auto">Let me know if I can provide more informations, but my demo is quite simple.</p>
<p dir="auto">I've got chunks split between head and body end, in some of the body end chunks it needs to reference things that were defined in the head chunk. If I require it in the body chunk, the dependency will end up in both head and body chunks. The only solution I can think of is having multiple compiler points and exporting the head dependencies and using them as externals in the body chunk, but I don't really want to do that. Is there a better way?</p>