Skip to main content
Extensions are factories that add focused capabilities to a Veryfront project: a cache store, an auth provider, a database adapter, a model provider, or an MDX content pipeline. For the concepts behind factories, contracts, capabilities, setup, and teardown, see Framework extensions.

Prerequisites

  • A Veryfront project with veryfront.config.ts.
  • For a first-party extension: the matching package installed.
  • For a local extension: a folder under extensions/ with a default-exported factory (see Extension authoring).

Enable an extension

Add extension factories to veryfront.config.ts:
Use a local extension the same way:
Verify the extension loads by running the dev server:
If the extension factory throws during setup, the dev server reports the setup error. For local extensions, edit the extension source and save veryfront.config.ts to force reload during development.

First-party extension areas

Verify it worked

Restart veryfront dev after editing veryfront.config.ts:
  • The dev log should print a setup line for each loaded extension.
  • Any contract the extension provides should now be resolvable through the matching consumer (for example, a CacheStore extension lets cache-aware code skip its local fallback).
  • If the factory throws during setup, the dev server prints the setup error with the extension name. Fix the error and reload.