Questions about webpack packaging multi-entry applications?

premise

the project uses multi-entry file packaging and encapsulates a set of components, and some components are introduced into each page. (for example, page An only introduces aMagi b; page B introduces A Magi C Magi D M F). There are some questions about whether to choose or not in the introduction of components

.
doubt
  1. package the component library with CommonsChunkPlugin to form a common dependency

    • disadvantages: the size of the component file is relatively large, the first loading time is long, the hash value is changed later, and the client cache expires
  2. rely on each component individually into the page file, similar to referencing lodash.clone instead of the entire lodash

    • disadvantage: page size becomes larger
    • advantage: when you modify a component later, the cache that does not reference the component will not be affected, and you do not have to reference the entire component library

I hope that the seniors who have relevant experience can answer it, and if there are any misunderstandings, I also hope to correct them:)

Mar.13,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b388fb-2c129.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b388fb-2c129.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?