Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
antfu avatar

Vite

  • 31.9k installs
  • 5.7k repo stars
  • Updated June 23, 2026
  • antfu/skills

vite is a skill for configuring Vite build tool for libraries, multi-page apps, and SSR.

About

Vite configuration patterns for library mode, multi-page applications, server-side rendering, and JavaScript API usage. Covers vite.config.ts setup, output format selection, and guidance on using meta-frameworks for SSR.

  • Library mode and multi-page app configuration patterns
  • SSR setup guidance (low-level primitives and meta-framework references)
  • JavaScript API for programmatic Vite access (createServer, build, preview)

Vite by the numbers

  • 31,908 all-time installs (skills.sh)
  • +700 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #23 of 2,245 Frontend Development skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/antfu/skills --skill vite

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs31.9k
repo stars5.7k
Security audit3 / 3 scanners passed
Last updatedJune 23, 2026
Repositoryantfu/skills

How do you configure Vite library mode and SSR?

Vite configuration patterns for library mode, multi-page applications, server-side rendering, and JavaScript API usage. Covers vite.config.ts setup, output format selection, and guidance on using met

Who is it for?

Frontend developers configuring Vite 8 projects, library packages, SSR apps, or custom Vite plugins in TypeScript.

Skip if: Teams on webpack or Parcel-only stacks without Vite in the build pipeline.

When should I use this skill?

User edits vite.config.ts, asks about Vite SSR, library mode, Rolldown migration, or Vite plugin API hooks.

What you get

Working vite.config.ts patterns for library builds, SSR, plugins, and Vite 8 Rolldown migration.

  • vite.config.ts patterns
  • SSR build setup
  • Plugin API examples

By the numbers

  • Skill version 2026.1.31 generated 2026-01-31 from vitejs/vite
  • Covers six reference topic files including Rolldown migration
  • Documents four primary Vite CLI commands including vite build --ssr

Files

SKILL.mdMarkdownGitHub ↗

Vite

Based on Vite 8 beta (Rolldown-powered). Vite 8 uses Rolldown bundler and Oxc transformer.

Vite is a next-generation frontend build tool with fast dev server (native ESM + HMR) and optimized production builds.

Preferences

  • Use TypeScript: prefer vite.config.ts
  • Always use ESM, avoid CommonJS

Core

TopicDescriptionReference
Configurationvite.config.ts, defineConfig, conditional configs, loadEnvcore-config
Featuresimport.meta.glob, asset queries (?raw, ?url), import.meta.env, HMR APIcore-features
Plugin APIVite-specific hooks, virtual modules, plugin orderingcore-plugin-api

Build & SSR

TopicDescriptionReference
Build & SSRLibrary mode, SSR middleware mode, ssrLoadModule, JavaScript APIbuild-and-ssr

Advanced

TopicDescriptionReference
Environment APIVite 6+ multi-environment support, custom runtimesenvironment-api
Rolldown MigrationVite 8 changes: Rolldown bundler, Oxc transformer, config migrationrolldown-migration

Quick Reference

CLI Commands

vite              # Start dev server
vite build        # Production build
vite preview      # Preview production build
vite build --ssr  # SSR build

Common Config

import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [],
  resolve: { alias: { '@': '/src' } },
  server: { port: 3000, proxy: { '/api': 'http://localhost:8080' } },
  build: { target: 'esnext', outDir: 'dist' },
})

Official Plugins

  • @vitejs/plugin-vue - Vue 3 SFC support
  • @vitejs/plugin-vue-jsx - Vue 3 JSX
  • @vitejs/plugin-react - React with Oxc/Babel
  • @vitejs/plugin-react-swc - React with SWC
  • @vitejs/plugin-legacy - Legacy browser support

Related skills

Forks & variants (3)

Vite has 3 known copies in the catalog totaling 2.1k installs. They canonicalize to this original listing.

How it compares

Use the vite skill for Vite-specific config and SSR; use webpack or turborepo skills when the repo does not use Vite.

FAQ

What Vite version does the vite skill target?

The vite skill version 2026.1.31 is generated from Vite 8 beta documentation and covers Rolldown-powered builds, Oxc transformer defaults, and migration notes in references/rolldown-migration.md.

What topics does the vite skill cover?

The vite skill spans vite.config.ts setup, import.meta.glob and HMR APIs, Vite plugin hooks, library mode and SSR builds, the Vite 6+ Environment API, and Rolldown migration guidance across six reference files.

When should developers use the vite skill?

Developers should load the vite skill when editing vite.config.ts, adding Vite plugins, configuring library or SSR outputs, or migrating an existing Vite 7 project to Vite 8 Rolldown defaults.

Is Vite safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.