vite
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVite is a modern build tool for frontend development featuring instant server start with native ES modules, lightning-fast HMR, and optimized production builds using Rolldown/Rollup. It supports TypeScript, JSX, CSS pre-processors out of the box and has a rich plugin ecosystem.
The skill is based on Vite 6.x, generated at 2026-01-28.
Vite是一款面向前端开发的现代化构建工具,它借助原生ES模块实现服务器即时启动,拥有闪电般快速的HMR,并通过Rolldown/Rollup完成优化的生产环境构建。它开箱即用地支持TypeScript、JSX、CSS预处理器,且具备丰富的插件生态系统。
本技能基于Vite 6.x版本,生成于2026年1月28日。
Core
核心功能
| Topic | Description | Reference |
|---|---|---|
| Configuration | Config file setup, defineConfig, conditional and async configs | core-config |
| CLI Commands | Dev server, build, preview commands and options | core-cli |
| Core Features | TypeScript, JSX, CSS, HTML processing, JSON handling | core-features |
| Using Plugins | Adding, configuring, and ordering plugins | core-plugins |
| 主题 | 描述 | 参考文档 |
|---|---|---|
| 配置 | 配置文件设置、defineConfig、条件式与异步配置 | core-config |
| CLI命令 | 开发服务器、构建、预览命令及选项 | core-cli |
| 核心特性 | TypeScript、JSX、CSS、HTML处理、JSON解析 | core-features |
| 插件使用 | 插件的添加、配置与排序 | core-plugins |
Features
功能特性
| Topic | Description | Reference |
|---|---|---|
| CSS Handling | CSS modules, pre-processors, PostCSS, Lightning CSS | features-css |
| Static Assets | Asset imports, public directory, URL handling | features-assets |
| Glob Import | import.meta.glob, dynamic imports, batch loading | features-glob-import |
| Environment Variables | .env files, modes, import.meta.env constants | features-env |
| HMR API | Hot Module Replacement client API | features-hmr |
| Web Workers | Worker imports and configuration | features-workers |
| Dependency Pre-Bundling | optimizeDeps, caching, monorepo setup | features-dep-bundling |
| 主题 | 描述 | 参考文档 |
|---|---|---|
| CSS处理 | CSS模块、预处理器、PostCSS、Lightning CSS | features-css |
| 静态资源 | 资源导入、公共目录、URL处理 | features-assets |
| 全局导入 | import.meta.glob、动态导入、批量加载 | features-glob-import |
| 环境变量 | .env文件、模式、import.meta.env常量 | features-env |
| HMR API | 热模块替换客户端API | features-hmr |
| Web Workers | Worker导入与配置 | features-workers |
| 依赖预构建 | optimizeDeps、缓存、单仓库配置 | features-dep-bundling |
Build
构建模块
| Topic | Description | Reference |
|---|---|---|
| Production Build | Build options, browser targets, multi-page apps | build-production |
| Library Mode | Building libraries with proper package exports | build-library |
| SSR | Server-side rendering setup and configuration | build-ssr |
| 主题 | 描述 | 参考文档 |
|---|---|---|
| 生产环境构建 | 构建选项、浏览器目标、多页面应用 | build-production |
| 库模式 | 构建具备规范包导出的类库 | build-library |
| SSR | 服务端渲染的搭建与配置 | build-ssr |
Advanced
进阶内容
| Topic | Description | Reference |
|---|---|---|
| JavaScript API | createServer, build, preview programmatic APIs | advanced-api |
| Plugin API | Creating Vite plugins, hooks, virtual modules | advanced-plugin-api |
| Performance | Optimization tips for dev server and builds | advanced-performance |
| Backend Integration | Integrating Vite with traditional backends | advanced-backend |
| 主题 | 描述 | 参考文档 |
|---|---|---|
| JavaScript API | createServer、build、preview程序化API | advanced-api |
| 插件API | 创建Vite插件、钩子、虚拟模块 | advanced-plugin-api |
| 性能优化 | 开发服务器与构建的优化技巧 | advanced-performance |
| 后端集成 | Vite与传统后端的集成方案 | advanced-backend |