All skills
onmax avatar

/vite

@de09c7b official
by Maxonmax/nuxt-skills715 stars
38

Vite build tool configuration, plugin API, SSR, and Vite 8 Rolldown migration. Use when working with Vite projects, vite.config.ts, Vite plugins, or building libraries/SSR apps with Vite.

Use this Skill: https://skilld.dev/gh/onmax/nuxt-skills/vite

This session only. Nothing lands on disk.

referencesrolldown-migration.md

≈718 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Rolldown Migration (Vite 8)

Vite 8 replaces esbuild+Rollup with Rolldown, a unified Rust-based bundler.

What Changed

Before (Vite 7) After (Vite 8)
esbuild (dev transform) Oxc Transformer
esbuild (dep pre-bundling) Rolldown
Rollup (production build) Rolldown
rollupOptions rolldownOptions
esbuild option oxc option

Performance Impact

  • 10-30x faster than Rollup for production builds
  • Matches esbuild's dev performance
  • Unified behavior between dev and build

Config Migration

rollupOptions → rolldownOptions

// Before (Vite 7)
export default defineConfig({
  build: {
    rollupOptions: {
      external: ['vue'],
      output: { globals: { vue: 'Vue' } },
    },
  },
})

// After (Vite 8)
export default defineConfig({
  build: {
    rolldownOptions: {
      external: ['vue'],
      output: { globals: { vue: 'Vue' } },
    },
  },
})

esbuild → oxc

// Before (Vite 7)
export default defineConfig({
  esbuild: {
    jsxFactory: 'h',
    jsxFragment: 'Fragment',
  },
})

// After (Vite 8)
export default defineConfig({
  oxc: {
    jsx: {
      runtime: 'classic',
      pragma: 'h',
      pragmaFrag: 'Fragment',
    },
  },
})

JSX Configuration

export default defineConfig({
  oxc: {
    jsx: {
      runtime: 'automatic',  // or 'classic'
      importSource: 'react', // for automatic runtime
    },
    jsxInject: `import React from 'react'`,  // auto-inject
  },
})

Custom Transform Targets

export default defineConfig({
  oxc: {
    include: ['**/*.ts', '**/*.tsx'],
    exclude: ['node_modules/**'],
  },
})

Plugin Compatibility

Most Vite plugins work unchanged. Rolldown supports Rollup's plugin API.

If a plugin only works during build:

{
  ...rollupPlugin(),
  enforce: 'post',
  apply: 'build',
}

New Capabilities

Rolldown unlocks features not possible before:

  • Full bundle mode (experimental)
  • Module-level persistent cache
  • More flexible chunk splitting
  • Module Federation support

Gradual Migration

For large projects, migrate via rolldown-vite first:

# Step 1: Test with rolldown-vite
pnpm add -D rolldown-vite

# Replace vite import in config
import { defineConfig } from 'rolldown-vite'

# Step 2: Once stable, upgrade to Vite 8
pnpm add -D vite@8

Overriding Vite in Frameworks

When framework depends on older Vite:

{
  "pnpm": {
    "overrides": {
      "vite": "8.0.0"
    }
  }
}
<!-- Source references: - https://vite.dev/blog/announcing-vite8-beta - https://vite.dev/blog/announcing-vite7 - https://vite.dev/config/shared-options#oxc -->

Source: SKILL.md on GitHub

No alerts9d5 checks · Risk SAFE
  • Gen Agent Trust Hub9d

    The skill provides comprehensive documentation and configuration guidance for Vite 8 and its Rolldown-based architecture. It covers core features, build processes, SSR, and plugin development using standard industry practices and official resources.

  • Socket9d

    No alerts

  • Snyk9d

    Risk: LOW · No issues

  • Runlayer7mo

    3/7 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at de09c7b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated last week
Other metadata
metadata
{
  "author": "Anthony Fu",
  "version": "2026.1.31",
  "source": "Generated from https://github.com/vitejs/vite, scripts at https://github.com/antfu/skills"
}

README badge

README badge for onmax/nuxt-skills/vite

Configures Vite 8 projects with vite.config.ts, plugin API, SSR builds, and Rolldown migration guidance. Covers dev server setup, production builds, library mode, virtual modules, and Vite 6+ multi-environment API.

Generated from the current SKILL.md.

Does this skill cover Vite 8 and Rolldown?
Yes. The skill is based on Vite 8 beta and includes a dedicated Rolldown migration reference that covers the bundler change, Oxc transformer, and config updates.
What should I use for testing with Vite?
The skill references a separate vitest skill, which is Vite-native testing and the recommended approach for Vite projects.
Does this cover SSR setup?
Yes. The skill includes SSR topics covering library mode, SSR middleware mode, ssrLoadModule, and the JavaScript API.
Is CommonJS supported?
No. The skill prefers ESM and explicitly recommends avoiding CommonJS.

Generated from the current SKILL.md. These answers refresh after source changes.