* Runs the registered transform hooks on the given HTML content. * * @param html - The raw HTML content to be transformed. * @param url - The URL associated with the HTML content, used for context during transformations. * @param preload - An array of URLs representing the JavaScript res
(
html: string,
url: URL,
preload: readonly string[] | undefined,
)
| 471 | * @returns A promise that resolves to the transformed HTML string. |
| 472 | */ |
| 473 | private async runTransformsOnHtml( |
| 474 | html: string, |
| 475 | url: URL, |
| 476 | preload: readonly string[] | undefined, |
| 477 | ): Promise<string> { |
| 478 | if (this.hooks.has('html:transform:pre')) { |
| 479 | html = await this.hooks.run('html:transform:pre', { html, url }); |
| 480 | } |
| 481 | |
| 482 | if (preload?.length) { |
| 483 | html = appendPreloadHintsToHtml(html, preload); |
| 484 | } |
| 485 | |
| 486 | return html; |
| 487 | } |
| 488 | } |
| 489 | |
| 490 | let angularServerApp: AngularServerApp | undefined; |
no test coverage detected