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

Function apply

test/configCases/html/output-html-hook-custom/webpack.config.js:23–35  ·  view source on GitHub ↗
(compiler)

Source from the content-addressed store, hash-verified

21 plugins: [
22 {
23 apply(compiler) {
24 EntryOptionPlugin.getHooks(compiler).entry.tap(
25 "MarkdownLike",
26 (context, name, desc) => {
27 const imports = desc.import;
28 if (!imports) return;
29 const tags = imports
30 .map((r) => `<script src="${r}"></script>`)
31 .join("");
32 return `data:text/html,<!doctype html><html><head></head><body><h1>From plugin</h1>${tags}</body></html>`;
33 }
34 );
35 }
36 },
37 {
38 apply(compiler) {

Callers

nothing calls this directly

Calls 4

tapMethod · 0.80
getHooksMethod · 0.80
emitAssetMethod · 0.80
resolveMethod · 0.65

Tested by

no test coverage detected