Skip to main content

Migration guide for Root v3.0

With the release of Root v3.0, we upgraded our main 3rd party deps to the latest versions. This update comes an update to Vite 8, which migrates its bundler from Rollup to a full Rust-based rebuild with Rolldown. We've also graduated Root AI from "experimental" with new config optiosn for it.

Vite config updates

Applies to v3.0.0 and above

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

A few items in particular to note:

`rollupOptions` is now `rolldownOptions`

Vite has deprecated the usage of the SASS legacy API (only the modern API is supported now). Root will automatically attempt under-the-hood to convert config settings to the new API, but you should make the following changes to your root.config.ts file:

⏪ Before:

ts
/** root.config.ts */

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

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

⏩ After:

/** root.config.ts */

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

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

Root AI out of experimental

The Root AI configuration has graduated from "experimental". The new config format supports a greater range of LLM providers.

`root.config.ts` update

The way SASS handles Mixed Declarations has changed, which may change the output of your CSS files.

⏪ 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},
      },
    ],
  },
})
1
2
3
4
5
6
7
8
9
10
11
12
Breakpoint: