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.

discoverErrorPage

función Since 1.1.0

Descubre app/error.meeko con los layouts raíz que lo envuelven: app/app.meeko, el layout default (app/layouts/default.meeko o, desde 1.5, el de un módulo) y app/pages/+layout.meeko.

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

Source code src/framework/routes-discovery.ts:84

Firma #

ts
function discoverErrorPage(projectRoot: string, options?: DiscoverErrorPageOptions): Promise<ErrorPageRecord | undefined>

Parameters #

projectRoot string

Carpeta del proyecto.

options DiscoverErrorPageOptions optional

Layouts con nombre de los módulos, desde 1.5.

Returns #

Promise<ErrorPageRecord | undefined>

La página de error con rutas absolutas, o undefined si no existe app/error.meeko.

Throws #

Error

Si también existe app/pages/+error.meeko, que define el mismo nivel.

Example #

ts
import { discoverErrorPage, discoverRoutes } from "@meekojs/meeko/build";

const routes = await discoverRoutes(process.cwd());
const errorPage = await discoverErrorPage(process.cwd());
// Pase errorPage a createFrameworkHandler, mountClientApp o AppManifest.

See also #

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/routes-discovery.ts