Vite + Alpha:Web 的统一工具链 (MIT 许可证)
Vite+ Alpha: Unified Toolchain for the Web (MIT License)

原始链接: https://voidzero.dev/posts/announcing-vite-plus-alpha

## Vite+ – 一体化的 Web 开发工具链 Vite+ 是一种新的、开源(MIT 许可)的工具链,旨在简化和加速 Web 应用程序的开发。它将 Vite、Vitest、Oxlint、Oxfmt、Rolldown 和 tsdown 结合到一个单一、简化的体验中,管理你的运行时(Node.js)和包管理器以及前端工具。 主要特性包括 `vp dev` 命令用于快速开发,`vp check` 命令用于代码检查/格式化/类型检查,`vp test` 命令用于无缝测试,以及 `vp build` 命令用于优化的生产构建。其核心组件是 **Vite Task**,一个强大的任务运行器,具有自动缓存和依赖感知执行功能。 Vite+ 旨在通过将配置合并到一个 `vite.config.ts` 文件中并提供一致的 CLI 来减少复杂性。它与流行的框架(如 React、Vue 和 Svelte)兼容。安装通过简单的脚本或 GitHub Action 即可完成。 创建者认为开源 Vite+ 对于实现提高开发者生产力的使命至关重要,并且正在通过其他途径构建可持续的业务(“Step into the Void”)。目前处于 Alpha 阶段,Vite+ 欢迎社区反馈。

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 工作 | 提交 登录 Vite+ Alpha: 用于 Web 的统一工具链 (MIT 许可证) (voidzero.dev) 42 分,作者 cpojer,6 小时前 | 隐藏 | 过去 | 收藏 | 3 条评论 帮助 orra 1 小时前 | 下一个 [–] 哦!这很酷。5 个月前宣布时看起来很有趣,但当时不是开源的。当时的讨论:https://news.ycombinator.com/item?id=45537035 现在开源了,并且集成了多个快速组件,这成为了 JS/TS 的一个显而易见的推荐。类似于 Rust 的 Cargo 和 Python 的 uv,对吗?回复 osener 2 小时前 | 上一个 | 下一个 [–] 这个公告提到了 Node.js 几次。它是否也支持 Bun 作为包管理器和运行时?回复 ameliaquining 1 小时前 | 父评论 | 下一个 [–] 不。有一个开放的问题:https://github.com/voidzero-dev/vite-plus/issues/557 回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系方式 搜索:
相关文章

原文

We’re excited to open-source Vite+ under the MIT license. Vite+ is a new unified toolchain and entry point to web application development that manages your runtime, package manager, and frontend toolchain. Give it a try today!

What is Vite+?

Vite+ combines Vite, Vitest, Oxlint, Oxfmt, Rolldown, and tsdown into a single, unified web development toolchain for developing, testing, linting, formatting, and building projects for production driven by our new task runner Vite Task. Since web development requires a runtime such as Node.js and a package manager, Vite+ can also manage them for you, covering the full local development cycle.

With Vite+, web development becomes simpler, faster, and more lightweight:

  • vp env: Manages Node.js globally and per project
  • vp install: Installs dependencies using the correct package manager automatically
  • vp dev: Uses Vite’s fast dev experience with native ES modules and instant HMRy
  • vp check: Lints with Oxlint, formats code using Oxfmt and checks types with tsgo
  • vp test: Seamlessly integrates and runs Vitest with fast feedback loops
  • vp build: Generates optimized production builds using Rolldown and Oxc
  • vp run: Executes monorepo tasks with automated caching and dependency resolution
  • vp pack: Bundles libraries for publishing on npm or creates standalone app binaries
  • vp create: Scaffolds new projects and monorepos with recommended settings

All these commands work seamlessly together out of the box, with one configuration file at the project root, and are compatible with all frameworks in Vite’s ecosystem, such as React, Vue, Svelte, or metaframeworks built on top of Vite.

Watch the video:

Performance & Scale

Vite+ is built to scale with your codebase while reducing your devtools to a single dependency. By leveraging VoidZero’s Rust-based JavaScript tooling, every interaction with the toolchain becomes significantly faster and scales better:

Getting Started

Install vp globally by running:

macOS / Linux

Windows (PowerShell)

CI

Use the setup-vp GitHub Action for CI environments.

After installing Vite+, open a new terminal session, run vp help, and check out our docs.

Using Vite+

To get started with web development, you need a JavaScript runtime, a package manager, and many other tools. In recent years, configuration files have proliferated, and complexity has increased at every level of the stack.

One of our goals with Vite+ was to simplify the web development process: All you need is vp and a vite.config.ts file at the root of your project to configure every tool in one place. This is what the development process looks like with Vite+:

  1. Start with vp create to interactively create a new project, monorepo, or app within a monorepo. The new project will be ready to go immediately, including pre-commit hooks!
  2. Run vp install to install JavaScript dependencies. This command delegates to the package manager of your choice (we recommend and default to pnpm).
  3. Use vp dev to start the Vite development server.
  4. When you are done making changes, run vp check to type-check, lint, and format your project all at once. Run vp check --fix to automatically fix formatting and linting issues (Pro tip: Run vp prepare to install Vite+’s pre-commit hooks!).
  5. Run vp test to run JavaScript tests.
  6. Build your project for production using vp build.
  7. Execute package.json scripts through Vite Task by using vp run <name> and execute local package binaries with vp exec <name>. Give vpx <name> a try for running local or remote binaries!
  8. Your Node.js version and package manager are automatically selected based on .node-version or your package.json.

A single binary with a consistent interface makes it easier to get started, faster to iterate, and simpler to work with for humans and AI. You no longer have to juggle Node.js version managers, package managers, a multitude of individual tools, their configuration files – or complex upgrades to any of them.

Vite Task

Vite Task is a powerful new open source project shipping as part of Vite+. It provides the core task runner for Vite+’s built-in commands as well as package.json scripts via vp run. Vite Task orchestrates tasks across workspace packages with:

  • Automated Input Tracking: Vite Task fingerprints input files used by commands to determine what should be cached locally without manual configuration. If nothing has changed, it skips the task entirely and replays the output instantly.
  • Dependency-aware execution: Tasks run in the correct order based on your package.json dependency graph and explicit dependsOn declarations. Multi-command scripts like tsc && vp build are split into sub-tasks and cached independently.
  • Familiar CLI: vp run mirrors the interface of pnpm run, including monorepo support, reducing the number of new concepts you need to learn to adopt Vite+.

For simple tasks that don’t depend on external inputs like environment variables, you can simply use vp run --cache <script> to cache the task run. Custom tasks, inputs and caching can be configured in your vite.config.ts:

Running vp run generate:icons generates icons on the first run and is skipped entirely if nothing changed on subsequent runs. If you edit a source file or the specified ICON_THEME environment variable changes, the task will re-run. Check out the Vite Task documentation for a comprehensive overview.

Migrating a Project to Vite+

Migrating a project to Vite+ is straightforward, whether you are only using Vite or already using many of VoidZero’s tools. While vp is a new global binary, the vite-plus package must be installed in your project to unify all tooling under one dependency. We recommend first upgrading to Vite 8.

To get started, run vp migrate in a project or paste this migration prompt into your favorite coding agent:

Migrate this project to Vite+. Run vp help to understand Vite+’s capabilities. Migrations can be run using vp migrate. Run vp help migrate for options. After the migration, verify the changes and make sure that type checking, linting, formatting, and tests pass. High-five your human when you are done.

If you are using ESLint or Prettier and would like to migrate to Oxlint and Oxfmt prior to migrating to Vite+, check out the Oxlint and Oxfmt migration guides.

MIT License

We initially considered a paid license for companies when we announced Vite+. We decided that Vite+ can only achieve our mission of making JavaScript developers more productive than ever before when it is truly free and open source. We got tired of debating which features should be paid and how they should be gated, as this only creates friction in the workflows our open-source users already enjoy and love. Feedback from the community helped us reinforce our conviction. Therefore, we decided to fully open source Vite+ under the MIT license.

In case you are wondering how we are going to build a sustainable business: Step into the Void.

Next Steps

Vite+ ships with the latest versions of our tools such as Vite 8, Vitest 4.1, Oxlint 1.52, Oxfmt beta. We’ll add more features and make frequent releases as we stabilize this alpha release of Vite+. We’d love to hear your feedback on Vite+ and are excited to see how it improves your workflow.

Connect with us:

联系我们 contact @ memedata.com