WXL
3 天以前 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1
node_modules/webpack/lib/optimize/AggressiveMergingPlugin.js
@@ -11,6 +11,7 @@
/** @typedef {import("../Compiler")} Compiler */
/**
 * Defines the aggressive merging plugin options type used by this module.
 * @typedef {object} AggressiveMergingPluginOptions
 * @property {number=} minSizeReduce minimal size reduction to trigger merging
 */
@@ -19,6 +20,7 @@
class AggressiveMergingPlugin {
   /**
    * Creates an instance of AggressiveMergingPlugin.
    * @param {AggressiveMergingPluginOptions=} options options object
    */
   constructor(options) {
@@ -30,11 +32,12 @@
            "Argument should be an options object. To use defaults, pass in nothing.\nFor more info on options, see https://webpack.js.org/plugins/"
         );
      }
      /** @type {AggressiveMergingPluginOptions} */
      this.options = options || {};
   }
   /**
    * Apply the plugin
    * Applies the plugin by registering its hooks on the compiler.
    * @param {Compiler} compiler the compiler instance
    * @returns {void}
    */
@@ -50,7 +53,7 @@
            },
            (chunks) => {
               const chunkGraph = compilation.chunkGraph;
               /** @type {{a: Chunk, b: Chunk, improvement: number}[]} */
               /** @type {{ a: Chunk, b: Chunk, improvement: number }[]} */
               const combinations = [];
               for (const a of chunks) {
                  if (a.canBeInitial()) continue;