WXL
3 天以前 9bce51f651aad297ef9eb6df832bfdaf1de05d84
node_modules/webpack/lib/library/EnableLibraryPlugin.js
@@ -14,17 +14,20 @@
const enabledTypes = new WeakMap();
/**
 * Defines the enable library plugin options type used by this module.
 * @typedef {object} EnableLibraryPluginOptions
 * @property {() => void=} additionalApply function that runs when applying the current plugin.
 */
/**
 * Returns enabled types.
 * @param {Compiler} compiler the compiler instance
 * @returns {LibraryTypes} enabled types
 */
const getEnabledTypes = (compiler) => {
   let set = enabledTypes.get(compiler);
   if (set === undefined) {
      /** @type {LibraryTypes} */
      set = new Set();
      enabledTypes.set(compiler, set);
   }
@@ -33,6 +36,7 @@
class EnableLibraryPlugin {
   /**
    * Creates an instance of EnableLibraryPlugin.
    * @param {LibraryType} type library type that should be available
    * @param {EnableLibraryPluginOptions} options options of EnableLibraryPlugin
    */
@@ -44,6 +48,7 @@
   }
   /**
    * Updates enabled using the provided compiler.
    * @param {Compiler} compiler the compiler instance
    * @param {LibraryType} type type of library
    * @returns {void}
@@ -53,6 +58,7 @@
   }
   /**
    * Checks enabled.
    * @param {Compiler} compiler the compiler instance
    * @param {LibraryType} type type of library
    * @returns {void}
@@ -70,7 +76,7 @@
   }
   /**
    * Apply the plugin
    * Applies the plugin by registering its hooks on the compiler.
    * @param {Compiler} compiler the compiler instance
    * @returns {void}
    */
@@ -236,6 +242,7 @@
                  class WarnFalseIifeUmdPlugin {
                     /**
                      * Applies the plugin by registering its hooks on the compiler.
                      * @param {Compiler} compiler the compiler instance
                      */
                     apply(compiler) {