Skip to content
Meeko
Type to search the guides and the API reference. Open it from any page with / or Ctrl K; move with the arrow keys and open a result with Enter.
Get started

Contents

On this page

Not translated yet

This page has not been translated into English yet, so it is shown in Spanish.

prerenderProject

función

Prerenderiza las rutas render: "prerender" con el build Node existente y las escribe en .meeko/output/node/prerender. Es lo que hace meeko prerender; el runtime se crea con prerendering: true.

ts
import { prerenderProject } from "@meekojs/meeko/build";

Source code src/framework/prerender.ts:309

Firma #

ts
function prerenderProject(projectRoot: string): Promise<string[]>

Parameters #

projectRoot string

Carpeta del proyecto con un build Node.

Returns #

Promise<string[]>

Las rutas absolutas de los archivos HTML escritos.

Throws #

Error

Si falta el build Node o una página no se puede prerenderizar.

Example #

ts
import { buildProject, prerenderProject } from "@meekojs/meeko/build";

await buildProject(process.cwd());
// Repite el prerender sobre el build existente.
const files = await prerenderProject(process.cwd());

Was this page helpful?

Add a comment

It is sent when you choose “Yes” or “No”. Only the page, your answer and the comment are stored: no cookies and no personal data.

0 of 2000 characters

Edit on GitHub: packages/meeko/src/framework/prerender.ts