What is the role of entry.vendor in webpack configuration

has not carefully studied the common code extraction of webpack before, and recently the project began to look back after bug, but after looking for a lot of information, there is a problem that has not been solved, that is, the relationship between entry.vendor and CommonChunkPlugin?

guess 1: the packages defined in vendor [] must be extracted as public dependencies vendor.js, but other dependencies will be introduced according to the configuration of CommonsChunkPlugin.

conjecture 2: only the packages defined in vendor [] will be extracted as public dependencies vendor.js other dependencies will not.

I am more inclined to guess one, but there is no detailed evidence on the data, so I would like to ask you.

Mar.09,2021

  1. vendor means dependent third-party libraries that do not change frequently, such as jQuery in your code
  2. CommonsChunkPlugin refers to the chunks that you have repeatedly quoted. It could be vendor, or one of your own common components
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-1b36f2b-2b89f.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-1b36f2b-2b89f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?