WXL
3 天以前 9bce51f651aad297ef9eb6df832bfdaf1de05d84
node_modules/webpack/lib/container/HoistContainerReferencesPlugin.js
@@ -34,7 +34,9 @@
      compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => {
         const hooks =
            getModuleFederationPlugin().getCompilationHooks(compilation);
         /** @type {Set<Dependency>} */
         const depsToTrace = new Set();
         /** @type {Set<Dependency>} */
         const entryExternalsToHoist = new Set();
         hooks.addContainerEntryDependency.tap(PLUGIN_NAME, (dep) => {
            depsToTrace.add(dep);
@@ -89,6 +91,7 @@
         );
         const containerRuntimes = chunkGraph.getModuleRuntimes(entryModule);
         /** @type {Set<string>} */
         const runtimes = new Set();
         for (const runtimeSpec of containerRuntimes) {
@@ -136,6 +139,7 @@
         const containerRuntimes =
            chunkGraph.getModuleRuntimes(containerEntryModule);
         /** @type {Set<string>} */
         const runtimes = new Set();
         for (const runtimeSpec of containerRuntimes) {
@@ -198,7 +202,9 @@
 */
function getAllReferencedModules(compilation, module, type, includeInitial) {
   const collectedModules = new Set(includeInitial ? [module] : []);
   /** @type {WeakSet<Module>} */
   const visitedModules = new WeakSet([module]);
   /** @type {Module[]} */
   const stack = [module];
   while (stack.length > 0) {