vite-plus README

The project's README from github.com/voidzero-dev/vite-plus. As one markdown file: README.md.

Vite+

The Unified Toolchain for the Web runtime and package management, create, dev, check, test, build, pack, and monorepo task caching in a single dependency


Vite+ is the unified entry point for local web development. It combines Vite, Vitest, Oxlint, Oxfmt, Rolldown, tsdown, and Vite Task into one zero-config toolchain that also manages runtime and package manager workflows:

All of this is configured from your project root and works across Vite's framework ecosystem. Vite+ is fully open-source under the MIT license.

Getting Started

Install Vite+ globally as vp:

For Linux or macOS:

curl -fsSL https://vite.plus | bash

For Windows:

irm https://viteplus.dev/install.ps1 | iex

vp handles the full development lifecycle such as package management, development servers, linting, formatting, testing and building for production.

Configuring Vite+

Vite+ can be configured using a single vite.config.ts at the root of your project:

import { defineConfig } from 'vite-plus';

export default defineConfig({
  // Standard Vite configuration for dev/build/preview.
  plugins: [],

  // Vitest configuration.
  test: {
    include: ['src/**/*.test.ts'],
  },

  // Oxlint configuration.
  lint: {
    ignorePatterns: ['dist/**'],
  },

  // Oxfmt configuration.
  fmt: {
    semi: true,
    singleQuote: true,
  },

  // Vite Task configuration.
  run: {
    tasks: {
      'generate:icons': {
        command: 'node scripts/generate-icons.js',
        cache: {
          env: ['ICON_THEME'],
        },
      },
    },
  },

  // `vp staged` configuration.
  staged: {
    '*': 'vp check --fix',
  },
});

This lets you keep the configuration for your development server, build, test, lint, format, task runner, and staged-file workflow in one place with type-safe config and shared defaults.

Use vp migrate to migrate to Vite+. It merges tool-specific config files such as .oxlintrc*, .oxfmtrc*, and lint-staged config into vite.config.ts.

CLI Workflows (vp help)

Start

Develop

Execute

Build

Manage Dependencies

Vite+ automatically wraps your package manager (pnpm, npm, Yarn, or Bun) based on packageManager and lockfiles:

Maintain

Scaffolding your first Vite+ project

Use vp create to create a new project:

vp create

You can run vp create inside of a project to add new apps or libraries to your project.

Organizations can expose a curated set of templates under their npm scope by publishing @org/create with a createConfig.templates manifest in its package.json. Once published, vp create @org opens an interactive picker over those templates, and setting create: { defaultTemplate: '@org' } in vite.config.ts makes it the default for bare vp create. See the Organization Templates guide for the authoring workflow and create.defaultTemplate for the config reference.

Migrating an existing project

You can migrate an existing project to Vite+:

vp migrate

GitHub Actions

Use the official setup-vp action to install Vite+ in GitHub Actions:

- uses: voidzero-dev/setup-vp@<setup-vp-version>
  with:
    node-version: '22'
    cache: true

Set <setup-vp-version> to an exact version from the setup-vp releases page. You can use a commit SHA instead. Do not use the v1 tag. The v1 tag no longer receives updates.

See Automatic Version Updates to configure Dependabot or Renovate.

Manual Installation & Migration

If you are manually migrating a project to Vite+, install these dev dependencies first:

vp install -D vite-plus

Add package-manager overrides so that other packages use the Vite+ versions. Alias vite to @voidzero-dev/vite-plus-core, setting <vite-plus-version> to the installed vite-plus version. Pin vitest to <vitest-version>, using the bundled version shown by vp toolchain vitest. The project and vp test then use the same Vitest copy. Without the pin, a dependency or workspace package can install a different Vitest version. The two versions can use separate mocks, expect functions, and runner states:

"overrides": {
  "vite": "npm:@voidzero-dev/vite-plus-core@<vite-plus-version>",
  "vitest": "<vitest-version>"
}

If you are using pnpm, add this to your pnpm-workspace.yaml:

overrides:
  vite@*: npm:@voidzero-dev/vite-plus-core@<vite-plus-version> # Match the installed vite-plus version
  vitest@*: <vitest-version> # Match the version from vp toolchain vitest

Or, if you are using Yarn:

"resolutions": {
  "vite": "npm:@voidzero-dev/vite-plus-core@<vite-plus-version>",
  "vitest": "<vitest-version>"
}

Sponsors

Thanks to namespace.so for powering our CI/CD pipelines with fast, free macOS, Linux, and Windows runners.

vite-plus (voidzero-dev/vite-plus)

bun
Searching Database…

What is this?Vite+ is the unified toolchain and entry point for web development: a single zero-config CLI (vp) that bundles Vite, Vitest, Oxlint, Oxfmt, Rolldown, tsdown and a task runner, and also manages your Node.js runtime and package manager.
Is it a framework or just a CLI wrapper around other tools?It is a CLI tool (the vp binary) that wraps and orchestrates existing tools (Vite, Vitest, Oxlint, Oxfmt, Rolldown, tsdown) rather than a framework you write code against.
How do I get vp running?You install Vite+ globally, using a platform-specific command for Linux/macOS or a separate one for Windows, which gives you the vp CLI for dev, build, test, lint and more.
Do I need to install Node.js and a package manager myself first?No, vp env manages Node.js and package managers for you, and vp automatically wraps whichever package manager your project uses (pnpm, npm, Yarn, or Bun) based on packageManager and lockfiles.
Any pitfalls when manually migrating an existing project instead of using vp migrate?You have to alias vite to @voidzero-dev/vite-plus-core and pin vitest to the exact version Vite+ bundles (shown by vp toolchain vitest); otherwise a dependency can pull in a different Vitest copy with separate mocks, expect functions, and runner state, causing subtle test bugs.
How do I configure all these tools at once?Everything lives in a single vite.config.ts at the project root, giving type-safe, shared configuration for the dev server, build, test, lint, format, task runner, and staged-file workflow.
How do I migrate an existing project to Vite+?Run vp migrate; it merges tool-specific config files like .oxlintrc, .oxfmtrc, and lint-staged config into a single vite.config.ts.
How do I scaffold a brand new project?Use vp create to pick a template; organizations can also publish their own curated templates under an npm scope (e.g. @org/create) and expose them via vp create @org.
Can I use Vite+ in CI/CD?Yes, the official setup-vp GitHub Action installs Vite+ in GitHub Actions; you should pin it to an exact version or commit SHA, since the v1 tag no longer receives updates.
What are similar projects?oxc, tools, nub, bun, closure-compiler, nx, woocommerce, pnpm
Size
37.3 MB
Stars
6.4K
Age
1y
Commits · 90 Days