UNPKG

webpack

Version:

Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.

33 lines (25 loc) 880 B
/* 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"); /** @import Dependency from "../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;