| | |
| | | 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); |
| | |
| | | ); |
| | | |
| | | const containerRuntimes = chunkGraph.getModuleRuntimes(entryModule); |
| | | /** @type {Set<string>} */ |
| | | const runtimes = new Set(); |
| | | |
| | | for (const runtimeSpec of containerRuntimes) { |
| | |
| | | |
| | | const containerRuntimes = |
| | | chunkGraph.getModuleRuntimes(containerEntryModule); |
| | | /** @type {Set<string>} */ |
| | | const runtimes = new Set(); |
| | | |
| | | for (const runtimeSpec of containerRuntimes) { |
| | |
| | | */ |
| | | 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) { |