(compiler)
| 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) { |