fix(runtime): stabilize navigation and custom errors
This commit is contained in:
@@ -66,6 +66,14 @@ interface RunningServer {
|
||||
|
||||
In development, `startServer` also connects `app/db/migrations` (and `app/db/<name>/migrations`) and auto-applies migrations, then starts an in-process file watcher. CSS edits hot-swap live. Page, component, layout, API, middleware, realtime, schema, locale, and public-asset edits invalidate only their cached modules, rescan routes where necessary, and morph fresh HTML through the existing HMR WebSocket. The server process and active gateway stay running.
|
||||
|
||||
### Custom not-found handlers
|
||||
|
||||
Add `app/pages/404.wrn` to customize unmatched frontend routes. The rendered
|
||||
page keeps the requested response's HTTP `404` status. Add `app/api/404.ts`
|
||||
with normal HTTP method exports to customize unmatched backend/API responses;
|
||||
its response body and headers are preserved and its status is normalized to
|
||||
`404`.
|
||||
|
||||
`getWrnCompileMetrics()` exposes cumulative content-addressed compiler cache
|
||||
`hits`, `misses`, successful `compilations`, `errors`, `totalDurationMs`, and
|
||||
`lastDurationMs` for the DevToolbar or custom diagnostics. Tests and embedded
|
||||
|
||||
Reference in New Issue
Block a user