vite

Configure Vite projects and migrate builds to Rolldown in Vite 8.

Updated Mar 27, 2024
One-click install
npx skills add https://github.com/boomNDS/new_portfolio --skill vite-boomnds
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vite
Source: https://github.com/boomNDS/new_portfolio/tree/main/.agents/skills/vite
Command: npx skills add https://github.com/boomNDS/new_portfolio --skill vite-boomnds

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This guide helps teams configure Vite projects, leverage the plugin API, and migrate to Vite 8 Rolldown.

Core Features & Use Cases

  • Configuration and optimization of vite.config.ts using defineConfig, aliasing, and environment management.
  • Plugin API usage for custom tooling, transforms, and server middlewares in Vite-powered apps.
  • Build & SSR workflows including library mode, SSR middleware, and multi-page apps with Rolldown.
  • Migration guidance for moving from esbuild/Rollup to Rolldown in Vite 8, with compatibility notes.

Quick Start

Install and initialize a Vite project, then follow the references to adopt Rolldown-based migration in Vite 8.

Frequently Asked Questions about vite

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure vite.config.ts for library builds and SSR?▼

To configure vite.config.ts for library builds and SSR, use defineDefine, aliasing, and environment management to establish a config-driven workflow with Rolldown. This approach manages multi-page apps and SSR middleware.

What is the best way to migrate from Rollup or esbuild to Rolldown in Vite 8?▼

The best way to migrate from Rollup or esbuild to Rolldown in Vite 8 involves following specific migration guidance and compatibility notes. This ensures a smooth transition to the new build tool.

How does the Vite plugin API work for custom tooling and server middlewares?▼

The Vite plugin API works by exposing hooks for custom tooling, transforms, and server middlewares in Vite-powered apps. This allows developers to intercept and modify the build process.

Can I use Vite environment management for multi-page apps with Rolldown?▼

Yes, you can use Vite environment management for multi-page apps with Rolldown. The system supports robust config-driven workflows to handle complex application structures.

When do I need to migrate to Vite 8 Rolldown?▼

You need to migrate to Vite 8 Rolldown when adopting the new build tool for improved performance. Migration guidance provides compatibility notes for moving from esbuild or Rollup.

Does Vite support SSR middleware and library mode simultaneously?▼

Yes, Vite supports SSR middleware and library mode simultaneously. The build and SSR workflows are designed to handle both configurations using Rolldown.