入门
🌐 Getting Started
Vite+ 是用于网页开发的统一工具链和入口。它通过结合 Vite、Vitest、Oxlint、Oxfmt、Rolldown、tsdown 和 Vite Task,在一个地方管理你的运行时、包管理器和前端工具链。
🌐 Vite+ is the unified toolchain and entry point for web development. It manages your runtime, package manager, and frontend toolchain in one place by combining Vite, Vitest, Oxlint, Oxfmt, Rolldown, tsdown, and Vite Task.
Vite+ 分为两个部分:vp,全局命令行工具,以及 vite-plus,安装在每个项目中的本地包。如果你已经有一个 Vite 项目,可以使用 vp migrate 将其迁移到 Vite+,或将我们的 迁移提示 粘贴到你的编码代理中。
🌐 Vite+ ships in two parts: vp, the global command-line tool, and vite-plus, the local package installed in each project. If you already have a Vite project, use vp migrate to migrate it to Vite+, or paste our migration prompt into your coding agent.
安装 vp
🌐 Install vp
macOS / Linux
curl -fsSL https://vite.plus | bashWindows
irm https://vite.plus/ps1 | iex安装完成后,打开一个新的终端并运行:
🌐 After installation, open a new shell and run:
vp helpINFO
Vite+ 将管理你的全局 Node.js 运行时和包管理器。如果你想退出此行为,请运行 vp env off。如果你觉得 Vite+ 不适合你,请输入 vp implode,但请 与我们分享你的反馈。
使用较小的平台(CPU 架构、操作系统)?
预构建的二进制文件针对以下平台分发(按 Node.js v24 平台支持层级 分组):
🌐 Prebuilt binaries are distributed for the following platforms (grouped by Node.js v24 platform support tier):
- 一级
- Linux x64 glibc(
x86_64-unknown-linux-gnu) - Linux arm64 glibc(
aarch64-unknown-linux-gnu) - Windows x64(
x86_64-pc-windows-msvc) - macOS x64(
x86_64-apple-darwin) - macOS arm64(
aarch64-apple-darwin)
- Linux x64 glibc(
- 二级
- Windows arm64(
aarch64-pc-windows-msvc)
- Windows arm64(
- 实验性的
- Linux x64 musl(
x86_64-unknown-linux-musl)
- Linux x64 musl(
- 其他
- Linux arm64 musl(
aarch64-unknown-linux-musl)
- Linux arm64 musl(
如果你的平台没有可用的预构建二进制文件,安装将会失败并出现错误。
🌐 If a prebuilt binary is not available for your platform, installation will fail with an error.
在 Alpine Linux(musl)上,你需要在使用 Vite+ 之前安装 libstdc++:
🌐 On Alpine Linux (musl), you need to install libstdc++ before using Vite+:
apk add libstdc++这是必须的,因为受管理的 非官方构建 Node.js 运行时依赖于 GNU C++ 标准库。
🌐 This is required because the managed unofficial-builds Node.js runtime depends on the GNU C++ standard library.
快速开始
🌐 Quick Start
创建一个项目,安装依赖,并使用默认命令:
🌐 Create a project, install dependencies, and use the default commands:
vp create # Create a new project
vp install # Install dependencies
vp dev # Start the dev server
vp check # Format, lint, type-check
vp test # Run JavaScript tests
vp build # Build for production你也可以单独运行 vp 并使用交互式命令行。
🌐 You can also just run vp on its own and use the interactive command line.
核心命令
🌐 Core Commands
Vite+ 可以处理整个本地前端开发周期,从启动项目、开发、检查和测试,到为生产构建。
🌐 Vite+ can handle the entire local frontend development cycle from starting a project, developing it, checking & testing, and building it for production.
开始
🌐 Start
vp create创建新的应用、软件包和单体仓库。vp migrate将现有项目迁移到 Vite+。vp config配置提交钩子和代理集成。vp staged对暂存的文件运行检查。vp install使用正确的包管理器安装依赖。vp env管理 Node.js 版本。
开发
🌐 Develop
执行
🌐 Execute
vp run在工作区中运行任务并使用缓存。vp cache清除任务缓存条目。vpx全局运行二进制文件。vp exec运行本地项目二进制文件。vp dlx运行软件包二进制文件而不将它们添加为依赖。
构建
🌐 Build
vp build构建应用。vp pack构建库或独立的工件。vp preview在本地预览生产版本。
管理依赖
🌐 Manage Dependencies
vp add、vp remove、vp update、vp dedupe、vp outdated、vp why和vp info封装了包管理器工作流程。vp pm <command>直接调用其他包管理器命令。
维护
🌐 Maintain
vp upgrade会更新vp本身的安装。vp implode会从你的计算机中删除vp及相关的 Vite+ 数据。
INFO
Vite+ 自带许多预定义命令,例如 vp build、vp test 和 vp dev。这些命令是内置的,无法更改。如果你想从你的 package.json 脚本运行命令,请使用 vp run <command>。