What are the necessary plug-ins commonly used in building production environment and development environment in webpack?

  node.js, question

I saw someone using it

new webpack.optimize.DedupePlugin(), new webpack.optimize.OccurenceOrderPlugin()

What are these two plug-ins used for?

New Web Pack. Optimize. Dedupe plugin () is a module that looks for equal or approximate modules to avoid duplicate modules in the final generated file. For example, it can be used to remove duplicate plug-ins in dependencies.
New webpack. Optimize. OccurrenceOrderPlugin () assigns IDs to components and modules. Through this plug-in Web Pack, the modules that are used most can be analyzed and prioritized, and the smallest ID can be assigned to them. By analyzing the ID, it can be suggested to reduce the size of the total file.