vite

Configure Vite build tooling, plugins, SSR, and library builds.

2|Updated Jan 5, 2024
One-click install
npx skills add https://github.com/wilfriedago/dotfiles --skill vite-wilfriedago
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vite
Source: https://github.com/wilfriedago/dotfiles/tree/main/agents/skills/vite
Command: npx skills add https://github.com/wilfriedago/dotfiles --skill vite-wilfriedago

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers configure and utilize the Vite build tool for frontend projects, streamlining build processes, optimizing assets, and enabling advanced features like Server-Side Rendering (SSR).

Core Features & Use Cases

  • Configuration: Understand and modify vite.config.ts for various build settings.
  • Plugin API: Learn how to create and use Vite plugins for custom build logic.
  • SSR & Library Builds: Configure Vite for Server-Side Rendering and building distributable libraries.
  • Use Case: You need to set up a new Vite project, configure its build output, or integrate a custom plugin to modify the build process.

Quick Start

Configure Vite to use React with the official plugin.

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 Server-Side Rendering?

To configure Vite for Server-Side Rendering, you modify vite.config.ts to set up SSR build settings, optimizing assets and enabling advanced rendering capabilities for frontend projects.

How does the Vite plugin API work for custom build logic?

The Vite plugin API allows you to create and integrate plugins into vite.config.ts, enabling you to customize and modify the build process for specific frontend project requirements.

Can I use Vite to build distributable libraries?

Yes, you can configure Vite for library build modes. This allows you to build distributable libraries by adjusting settings within vite.config.ts to output optimized assets.

What do I need to know about Vite 8 migration to Rolldown and Oxc?

Vite 8 migrates to the Rolldown bundler and Oxc transformer to optimize build performance. This migration impacts configuration and workflow when updating existing frontend projects.

Why is my Vite environment variable handling not working as expected?

Vite environment variable handling requires specific configuration within vite.config.ts. Proper setup ensures variables are correctly exposed during the build process and Server-Side Rendering.

What is the best way to use HMR API with a Vite build tool?

The best way to use the HMR API is by leveraging Vite's built-in Hot Module Replacement capabilities. This requires configuring vite.config.ts to optimize build performance and workflow.