My webpack build outputs 3 bundles.
- The entry point.
- node_modules code, generated by
splitChunks - The extracted css file.
This is a library meant to be used by other devs, so I don't control the HTML that the entry point is loaded from. A user is going to include the entry point with <script>, then my application code should somehow load bundles 2 && 3, which have hashed names.
To be clear, I don't want to load modules with dynamic imports, (i.e. modules you npm install, or files you import), I want to load the webpack output chunk that contains modules.
(I actually have 2 entrypoints, which is why bundle #2 exists, but I left it out for simplicity.)