Skip to content

Upgrading PreactPress

Step-by-step upgrade paths between PreactPress versions

Upgrading PreactPress#

This page summarizes upgrade paths. The full guide lives in the repository at UPGRADE.md.

Quick upgrade (2.2 → 2.3)#

No breaking changes. Update the package and replace deprecated aliases:

pnpm add -D @kamod-ch/preactpress@^2.3.0
pnpm check
pnpm build
Deprecated Use instead
llmsTxtPlugin() aiExportsPlugin()
printCheckResult() printDocumentationCheckResult()
SiteConfig ResolvedConfig

Upgrade from 1.x to 2.x#

Version 2.x adds plugins, versioning, redirects, AI exports, and preactpress check.

1. Update dependencies#

pnpm add -D @kamod-ch/preactpress@^2.0.0

Add official plugins as needed:

pnpm add -D @preactpress/plugin-mermaid @preactpress/plugin-playground

2. Adopt plugin registration#

import { defineConfig } from "@kamod-ch/preactpress/config";
import { mermaidPlugin } from "@preactpress/plugin-mermaid";

export default defineConfig({
  plugins: [mermaidPlugin()],
});

Legacy config hooks (transformHead, transformPageData, buildEnd) still work.

3. Add validation to CI#

- run: pnpm check

See GitHub Actions check example.

4. Enable new features (optional)#

Redirects:

redirects: { "/old": "/guide/new" },

AI exports:

ai: { llmsTxt: true, llmsFullTxt: true, copyMarkdown: true, contextIndex: true },

Versioning: see Documentation versioning.

5. Verify#

preactpress check --strict
preactpress build

Node.js requirements#

Node.js 20+ is required. Tested on 20, 22, and 24.

Other migration paths#

From Guide
VitePress Migrate from VitePress
All paths index MIGRATION.md
Breaking changes CHANGELOG
Known constraints Limitations

Getting help#

Open a GitHub Issue with your PreactPress version, config snippet, and preactpress check output.

Last updated Jul 29, 2026