/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
lib/container/moduleFederationHooks.js
32 строки
886 B
Alexander Akait
perf: load webpack's own modules only when a build needs them (#21652)
10 авг 2026, 07:32
Не верифицирован
10 авг 2026, 07:32
8e28763
Код
Авторство
О чём код?
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Alexander Akait @alexander-akait */ "use strict"; const { SyncHook } = require("tapable"); const createHooksRegistry = require("../util/createHooksRegistry"); /** @typedef {import("../Dependency")} Dependency */ const createCompilationHooks = () => ({ /** * @type {SyncHook<Dependency>} * @since 5.96.0 */ addContainerEntryDependency: new SyncHook(["dependency"]), /** * @type {SyncHook<Dependency>} * @since 5.96.0 */ addFederationRuntimeDependency: new SyncHook(["dependency"]) }); /** @typedef {ReturnType<typeof createCompilationHooks>} CompilationHooks */ // lives outside `ModuleFederationPlugin` so the plugins it applies can read the // hooks without requiring it back const getCompilationHooks = createHooksRegistry(createCompilationHooks); module.exports = getCompilationHooks;