( coreCompiler: CoreCompiler, config: ValidatedConfig, hydrateAppFilePath?: string, componentGraph?: BuildResultsComponentGraph, srcIndexHtmlPath?: string, )
| 25 | }; |
| 26 | |
| 27 | export const runPrerenderTask = async ( |
| 28 | coreCompiler: CoreCompiler, |
| 29 | config: ValidatedConfig, |
| 30 | hydrateAppFilePath?: string, |
| 31 | componentGraph?: BuildResultsComponentGraph, |
| 32 | srcIndexHtmlPath?: string, |
| 33 | ) => { |
| 34 | const diagnostics: Diagnostic[] = []; |
| 35 | |
| 36 | try { |
| 37 | const prerenderer = await coreCompiler.createPrerenderer(config); |
| 38 | const results = await prerenderer.start({ |
| 39 | hydrateAppFilePath, |
| 40 | componentGraph, |
| 41 | srcIndexHtmlPath, |
| 42 | }); |
| 43 | |
| 44 | diagnostics.push(...results.diagnostics); |
| 45 | } catch (e: any) { |
| 46 | catchError(diagnostics, e); |
| 47 | } |
| 48 | |
| 49 | return diagnostics; |
| 50 | }; |
no test coverage detected