Reputation: 110892
I use webpacks dynamic code splitting, which works quite well so far. But I have one module (mC
) with a large dependency that is required from two other modules (mA
& mB
). With code splitting there are two bundles created both with the same content of largeLib
. And for each of modules on of the bundles is loaded. I would expect that only one module is created and used by both mA
and mB
mA mB
\ /
\/
mC
|
largeLib
Upvotes: 0
Views: 128
Reputation: 110892
Adding an specific name to the import solves the problem for me:
import(/* webpackChunkName: "handsOnTable" */ 'react-handsontable'),
Upvotes: 1