MCPcopy
hub / github.com/webpack/webpack / apply

Method apply

lib/CircularModulesPlugin.js:174–187  ·  view source on GitHub ↗

* @param {Compiler} compiler the compiler instance * @returns {void}

(compiler)

Source from the content-addressed store, hash-verified

172 * @returns {void}
173 */
174 apply(compiler) {
175 compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
176 compilation.hooks.optimizeModules.tap(PLUGIN_NAME, (modules) => {
177 const { circularModules } = CycleGraph.build(
178 modules,
179 compilation.moduleGraph
180 );
181 for (const m of modules) {
182 /** @type {BuildInfo} */
183 (m.buildInfo).isCircular = circularModules.has(m);
184 }
185 });
186 });
187 }
188}
189
190module.exports = CircularModulesPlugin;

Callers

nothing calls this directly

Calls 3

tapMethod · 0.80
buildMethod · 0.45
hasMethod · 0.45

Tested by

no test coverage detected