MCPcopy Index your code
hub / github.com/stenciljs/core / runPrerenderTask

Function runPrerenderTask

src/cli/task-prerender.ts:27–50  ·  view source on GitHub ↗
(
  coreCompiler: CoreCompiler,
  config: ValidatedConfig,
  hydrateAppFilePath?: string,
  componentGraph?: BuildResultsComponentGraph,
  srcIndexHtmlPath?: string,
)

Source from the content-addressed store, hash-verified

25};
26
27export 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};

Callers 2

taskBuildFunction · 0.90
taskPrerenderFunction · 0.85

Calls 2

catchErrorFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected