new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Nuxt · API · all subjects

configuration & defaults

8 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

experimental.emitRouteChunkError configuration

The experimental.emitRouteChunkError configuration option controls chunk loading error handling. Set to false to disable hooking into chunk errors entirely, or to 'manual' to handle them yourself. By default, Nuxt performs a hard reload when a chunk fails to load during route navigation.

selectiveClient 'deep' mode for slots

Setting selectiveClient: 'deep' additionally allows passing slots to nuxt-client components. Those slots are rendered on the server and are not interactive on the client.

experimental.componentIslands configuration

Component islands are controlled by experimental.componentIslands. The default value is 'auto', which enables the feature automatically as soon as the app contains a server component or island. The option can be set to an object with properties: selectiveClient (boolean or 'deep' to enable nuxt-client), and remoteIsland (boolean to allow rendering islands from a remote source).

routeRules configuration example

Example routeRules configuration with prerender, cache, and redirect options: prerender routes for SEO, cache API routes for 1 hour with maxAge: 60 * 60, and redirect old pages to new pages with status 302.

routeRules configuration for hybrid rendering

routeRules in nuxt.config.ts allows defining rules to customize how each route is rendered. Options include prerender (for build-time generation), cache (with maxAge option), redirect (with to and status properties), and Nuxt-specific rules like ssr, appMiddleware, and noScripts.

Nitro storage configuration

Configure storage mount points using nitro.storage in nuxt.config or server plugins. Example for Redis storage: nitro: { storage: { redis: { driver: 'redis', port: 6379, host: '127.0.0.1', username: '', password: '', db: 0, tls: {} } } }

Nitro config in nuxt.config

Use the nitro key in nuxt.config to directly set Nitro configuration. This is an advanced option and custom config can affect production deployments, as the configuration interface might change over time when Nitro is upgraded in semver-minor versions of Nuxt.

Server storage with plugins and runtime config

Configure storage dynamically in server/plugins/ using a plugin with definePlugin. Mount a storage driver using storage.mount('redis', driver) where driver is created with credentials from useRuntimeConfig(). Define runtime config in nuxt.config.ts with default values for redis host and port.

Give your agent this brain