WXL
3 天以前 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1
node_modules/webpack/lib/ContextReplacementPlugin.js
@@ -20,6 +20,7 @@
class ContextReplacementPlugin {
   /**
    * Creates an instance of ContextReplacementPlugin.
    * @param {RegExp} resourceRegExp A regular expression that determines which files will be selected
    * @param {(string | ((context: BeforeContextResolveData | AfterContextResolveData) => void) | RegExp | boolean)=} newContentResource A new resource to replace the match
    * @param {(boolean | NewContentCreateContextMap | RegExp)=} newContentRecursive If true, all subdirectories are searched for matches
@@ -44,6 +45,7 @@
      ) {
         this.newContentResource = newContentResource;
         /**
          * Stores new content create context map.
          * @param {InputFileSystem} fs input file system
          * @param {(err: null | Error, newContentRecursive: NewContentCreateContextMap) => void} callback callback
          */
@@ -87,7 +89,7 @@
   }
   /**
    * Apply the plugin
    * Applies the plugin by registering its hooks on the compiler.
    * @param {Compiler} compiler the compiler instance
    * @returns {void}
    */
@@ -202,6 +204,7 @@
}
/**
 * Creates a resolve dependencies from context map.
 * @param {(fs: InputFileSystem, callback: (err: null | Error, map: NewContentCreateContextMap) => void) => void} createContextMap create context map function
 * @returns {(fs: InputFileSystem, options: ContextModuleOptions, callback: (err: null | Error, dependencies?: ContextElementDependency[]) => void) => void} resolve resolve dependencies from context map function
 */