MCPcopy Create free account
hub / github.com/jantimon/html-webpack-plugin / getCompilationHooks

Method getCompilationHooks

index.js:99–115  ·  view source on GitHub ↗

* Returns all public hooks of the html webpack plugin for the given compilation * * @param {Compilation} compilation * @returns {HtmlWebpackPluginHooks}

(compilation)

Source from the content-addressed store, hash-verified

97 * @returns {HtmlWebpackPluginHooks}
98 */
99 static getCompilationHooks(compilation) {
100 let hooks = compilationHooksMap.get(compilation);
101
102 if (!hooks) {
103 hooks = {
104 beforeAssetTagGeneration: new AsyncSeriesWaterfallHook(["pluginArgs"]),
105 alterAssetTags: new AsyncSeriesWaterfallHook(["pluginArgs"]),
106 alterAssetTagGroups: new AsyncSeriesWaterfallHook(["pluginArgs"]),
107 afterTemplateExecution: new AsyncSeriesWaterfallHook(["pluginArgs"]),
108 beforeEmit: new AsyncSeriesWaterfallHook(["pluginArgs"]),
109 afterEmit: new AsyncSeriesWaterfallHook(["pluginArgs"]),
110 };
111 compilationHooksMap.set(compilation, hooks);
112 }
113
114 return hooks;
115 }
116
117 /**
118 * @param {HtmlWebpackOptions} [options]

Callers 3

generateHTMLMethod · 0.80
hooks.jsFile · 0.80
basic.spec.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected