Skip to main content
Migration

Migrating to Root.js v3

Root.js v3 updates its main dependencies to their latest versions, including Vite 8, which replaces Rollup with Rolldown, a bundler written in Rust. Root AI has also graduated from "experimental", with new config options.

Node.js 24

Applies to v3.3.1 and above

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

Vite config updates

Applies to v3.0.0 and above

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

Root.js renames rollupOptions to rolldownOptions for you, but editors like VS Code show a deprecation warning. To migrate, rename the option:

⏪ 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

The Root AI config has graduated from "experimental". The new format supports more 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

Found an issue that isn't covered here? File an issue on GitHub.

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