Skip to main content
Migration

Migrating to Root.js v3

Root.js v3 upgrades its core dependencies, including Vite 8, which replaces Rollup with Rolldown (a Rust-based bundler). Root AI has also graduated out of experimental status with a new configuration format.

Node.js 24

Applies to v3.3.1 and above

Root.js now requires Node.js 24 (the current LTS) or later. Update your local environment, CI, and hosting runtime (for example, runtime: nodejs24 in App Engine's app.yaml).

Vite config updates

Applies to v3.0.0 and above

Vite has been upgraded to v8. See Vite's migration guide for full details.

Root.js automatically maps rollupOptions to rolldownOptions, though editors like VS Code will flag it as deprecated. Rename the option to clear the warning:

⏪ Before:

ts
// @/root.config.ts

import {defineConfig} from '@blinkk/root';

export default defineConfig({
  vite: {
    build: {rollupOptions: {...}},
  },
});

⏩ After:

ts
// @/root.config.ts

import {defineConfig} from '@blinkk/root';

export default defineConfig({
  vite: {
    build: {rolldownOptions: {...}},
  },
});

Root AI config

Root AI is no longer behind an experimental flag, and the new configuration format adds support for multiple model providers.

⏪ Before:

ts
cmsPlugin({
  experiments: {ai: true},
});

⏩ After:

ts
cmsPlugin({
  ai: {
    defaultModel: 'gemini-3.5-flash',
    models: [
      {
        id: 'claude-opus-4-7',
        label: 'Claude Opus 4.7',
        provider: 'anthropic',
        apiKey: process.env.ANTHROPIC_API_KEY,
        capabilities: {tools: true, reasoning: true, attachments: true},
      },
      {
        id: 'gemini-3.5-flash',
        label: 'Gemini 3.5 Flash',
        provider: 'gemini',
        apiKey: process.env.GEMINI_API_KEY,
        capabilities: {tools: true, reasoning: true, attachments: true},
      },
      {
        id: 'gpt-5.5',
        label: 'GPT-5.5',
        provider: 'openai',
        apiKey: process.env.OPENAI_API_KEY,
        capabilities: {tools: true, reasoning: true, attachments: true},
      },
    ],
  },
});

Other issues

Hit an issue that isn't covered here? Open an issue on GitHub.

1
2
3
4
5
6
7
8
9
10
11
12
Breakpoint: