WXL
4 天以前 2cc85c64f1c64a2dbaeae276a3e2ca8420de76b7
node_modules/webpack/lib/AutomaticPrefetchPlugin.js
@@ -13,9 +13,14 @@
const PLUGIN_NAME = "AutomaticPrefetchPlugin";
/**
 * Records modules from one compilation and adds them back as prefetch
 * dependencies in the next compilation.
 */
class AutomaticPrefetchPlugin {
   /**
    * Apply the plugin
    * Registers hooks that remember previously built normal modules and enqueue
    * them as `PrefetchDependency` requests during the next make phase.
    * @param {Compiler} compiler the compiler instance
    * @returns {void}
    */
@@ -29,7 +34,7 @@
            );
         }
      );
      /** @type {{context: string | null, request: string}[] | null} */
      /** @type {{ context: string | null, request: string }[] | null} */
      let lastModules = null;
      compiler.hooks.afterCompile.tap(PLUGIN_NAME, (compilation) => {
         lastModules = [];