vite
更快构建 Vite 应用
Vite 项目需要在开发、构建、插件和部署方面进行仔细配置。此技能为常见 Vite 工作流提供简明指导。
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "vite" from https://skillstore.io/skills/antfu-vite.md and its manifest at https://skillstore.io/api/skills/antfu-vite/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“vite”。 我需要 Vite 环境变量指导。
预期结果:
- 只对可能进入客户端代码的值使用公共前缀。
- 将密钥保持为无前缀并留在服务器端。
- 使用 modes 区分 staging 和 production。
正在使用“vite”。 帮我改进速度慢的 Vite 开发服务器。
预期结果:
- 先检查插件转换成本。
- 在可行时使用显式导入扩展名。
- 审查依赖预打包和缓存失效设置。
正在使用“vite”。 我正在构建一个 Vite 库包。
预期结果:
- 先选择入口点和输出格式。
- 让 package exports 与生成的构建文件保持一致。
- 为使用者记录 CSS 输出和环境变量行为。
安全审计
安全All 44 static alerts are false positives from Markdown syntax, documentation examples, local URLs, and ordinary Vite APIs. No command execution, reconnaissance, credential exposure, prompt injection, or malicious intent was found.
风险因素
⚡ 包含脚本 (4)
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/antfu-vite/audits/5?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/antfu-vite?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/antfu-vite?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/antfu-vite/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/antfu-vite.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学术引用 (APA · BibTeX · CFF)
APA 引用
antfu. (2026). vite security audit report (audit version 5) [Author version 2026.1.31]. Skillstore. https://skillstore.io/skills/antfu-vite/audits/5BibTeX 引用
@techreport{antfu-antfu-vite-2026,
author = {antfu},
title = {vite security audit report (audit version 5)},
institution = {Skillstore},
year = {2026},
number = {5},
url = {https://skillstore.io/skills/antfu-vite/audits/5},
note = {Author version 2026.1.31}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "vite security audit report (audit version 5)"
version: "2026.1.31"
type: report
authors:
- name: "antfu"
date-released: "2026-07-23"
url: "https://skillstore.io/skills/antfu-vite/audits/5"
identifiers:
- type: other
value: "skillstore:antfu-vite:audit:5"
description: "Skillstore immutable audit report identifier"
Skillstore 评分
评分依据 证据置信度: 高你能构建什么
配置前端应用
设置 Vite 配置、脚本、别名、环境变量和生产构建选项。
构建并发布库
规划 Vite 库模式、入口点、文件名、CSS 输出和 package exports。
将 Vite 与后端集成
连接 Vite 资源、manifest、开发服务器脚本、SSR 输出和传统后端模板。
试试这些提示
解释新 React 项目最稳妥的 Vite 设置。包括配置文件、脚本和环境变量指导。
审查我针对开发、构建和预览的 Vite 配置目标。告诉我应该使用哪些选项以及原因。
为 Vue、bundle analysis 和依赖预打包规划一个 Vite 插件设置。包括插件顺序和常见故障点。
设计一个用于 SSR、库输出和后端集成的 Vite 架构。涵盖构建步骤、manifest、部署和测试检查。
最佳实践
- 保持 Vite 配置精简、明确,并按开发和生产需求分离。
- 仅通过批准的前缀暴露预期的客户端环境变量。
- 部署前测试构建、预览输出、SSR 和后端 manifest。
避免
- 不要通过客户端环境前缀暴露密钥。
- 不要在未检查顺序、作用范围和构建影响的情况下添加插件。
- 不要依赖开发服务器行为来证明生产环境正确性。
常见问题
此技能会执行 Vite 命令吗?
它能帮助 Claude、Codex 和 Claude Code 吗?
它涵盖环境变量吗?
它能帮助 SSR 项目吗?
它包括插件编写指导吗?
它绑定到某个 Vite 版本吗?
开发者详情
作者
antfu许可证
MIT
作者版本
v2026.1.31
Skillstore 修订
r2
引用
89edfdc710d0846129dcee6a929477b04f08052c
维护新鲜度
2026/7/24
使用量
15 次下载 · 578 次浏览