Установка промпта

I want to use Vite+ in my project. Vite+ is the unified toolchain for the web behind the `vp` CLI — one tool combining Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task, plus runtime and package-manager management.

First, read https://viteplus.dev/llms-full.txt and https://viteplus.dev/guide to learn Vite+'s commands and configuration. Inspect the worktree and preserve unrelated changes. Determine whether I want a new project or want to migrate or upgrade an existing project. Follow only the matching flow below.

For a new project:

Read https://viteplus.dev/guide/create and choose the template, target directory, package manager, and intended Vite+ release or preview for my project. Use the target CLI's `help create` output to select supported options. Scaffold with `vp create`; do not overwrite existing project files.

A global installation is optional. To install the global `vp` CLI when it is not already available:
- macOS / Linux: curl -fsSL https://vite.plus | bash
- Windows (PowerShell): irm https://vite.plus/ps1 | iex

Open a new terminal after installation. Follow https://viteplus.dev/guide/upgrade to select the target release or preview and check `vp toolchain --global` before scaffolding.

Without a global installation, use a supported Node.js runtime from the compatibility guide. For the 1.7.0 release, run `pnpm dlx --package=vite-plus@1.7.0 vp create` or `npx --package=vite-plus@1.7.0 vp create`. Replace 1.7.0 with the intended release version. For a preview, use the version from its PR and pass `--registry=https://registry-bridge.viteplus.dev` to pnpm or npx before the vp command.

Run `vp install`, `vp check`, and `vp test`, then `vp build` for applications or `vp pack` for libraries. Without a global CLI, install with the project's package manager and run the local CLI through it, such as `pnpm exec vp check` or `npm exec -- vp check`. Explain how to use `vp dev` for the dev server and `vp run <task>` for project scripts or tasks. Report the setup changes, validation results, and any remaining work. Do not commit or push unless I ask.

For an existing project, including one that already uses Vite+, follow these migration or upgrade instructions:

Migrate this project to Vite+ while preserving its application, test, and library build behavior.

Read these guides before making changes:

- https://viteplus.dev/guide/migrate
- https://viteplus.dev/guide/migrate-rules
- https://viteplus.dev/guide/vitest-v5
- https://vitest.dev/guide/migration/
- https://github.com/rolldown/tsdown/releases/tag/v0.23.0

Inspect the worktree and preserve unrelated changes. Identify the workspace root, package manager, scripts, configuration files, and tools in use. If the project already uses Vite+, follow the upgrade flow in the migration guide and keep the existing setup; do not use --full unless I request it.

For a project that does not use Vite+ yet, check the prerequisites for the tools it uses: Vite 7+ and Vitest 4+. Complete any required upstream upgrades and validate them before starting the Vite+ migration. Then keep those manifests, lockfile, and installed packages available so the migrator can identify the original Vitest version. Do not install vite-plus or upgrade Vitest to the target's bundled version before running migration.

Use the CLI from the target Vite+ 1.0 release or its preview build. Use a supported Node.js runtime from the compatibility guide. A global installation is optional:

- With a global vp installation, follow https://viteplus.dev/guide/upgrade to select the target release and check `vp toolchain --global`. Run `vp help` and `vp help migrate`, then `vp migrate --no-interactive` from the workspace root.
- Without a global installation, run the target CLI through the package manager from the workspace root. For the 1.7.0 release, use `pnpm dlx --package=vite-plus@1.7.0 vp migrate --no-interactive` or `npx --package=vite-plus@1.7.0 vp migrate --no-interactive`. First run the same command with `help migrate` instead of `migrate --no-interactive` to read its help. These commands fetch the target CLI without replacing the old project dependencies first.

Replace 1.7.0 with the intended release version. For a preview, use the version from its PR and pass `--registry=https://registry-bridge.viteplus.dev` to pnpm or npx before the vp command.

Do not run migration with an old project's node_modules/.bin/vp. Migrate monorepos from the workspace root so shared manifests, catalogs, overrides, and lockfiles remain consistent.

Resolve BLOCK findings and rerun migration. Review every REVIEW finding and manual-migration warning using the linked guidance, even if migration exits with success. Keep the generated Vitest v4 and tsdown <0.23 compatibility settings and comments for the first validation run.

Review the resulting changes against the migration rules:

- Confirm Vite and test imports use the supported vite-plus and vite-plus/test* entries. Keep type augmentations on their upstream module identities and the community WebDriverIO provider on @vitest/browser-webdriverio.
- Preserve dependencies, aliases, catalogs, and overrides configured by the migrator. On pnpm, keep the configured vite and vitest entries. Retain upstream packages when the migration rules require them.
- Move remaining tool-specific configuration into the appropriate blocks in vite.config.ts. Review manual follow-up for lint, formatting, packaging, and hooks without discarding project-specific behavior.
- Distinguish built-ins from tasks: `vp dev` and `vp test` run built-in tools; `vp run dev` and `vp run test` run the corresponding project scripts or tasks. The packageManager field selects the package manager used by `vp install`, `vp add`, and `vp remove`.

Run `vp install`, `vp check`, and `vp test`, plus configured browser, coverage, and benchmark suites. Run `vp build` for applications and `vp pack` for libraries, including both where the workspace contains both. Check library consumers against emitted imports and declarations. Without a global CLI, install with the project's package manager and invoke the updated local CLI through it, such as `pnpm exec vp check` or `npm exec -- vp check`. Fix failures without weakening assertions or dropping test coverage.

After establishing a passing baseline, try to remove the generated "Vitest v4 compatibility" settings with no code changes or small, localized fixes:

1. Use the migration diff and generated comments to identify additions in root, workspace, and inline project configs. Read each linked explanation and check the effective setting after removal, including inherited values. Preserve pre-existing user settings and settings whose origin is unclear.
2. Remove one added setting at a time and first run the affected projects and suites without code changes. If needed, make small, localized application, test, or setup fixes that preserve test intent, such as correcting a locator or adjusting mock setup in a few tests. Do not weaken assertions, accept snapshot changes without review, or reduce the test set. For fakeTimers.toNotFake, remove only the added Temporal entry and preserve other exclusions. Do not weaken coverage enforcement: retain glob-threshold perFile: true unless I approve aggregate checking, even if coverage passes.
3. Keep a removal only when the affected tests pass and still execute the same tests without new skips. Remove that setting's generated comment too. If removal requires widespread test edits or shared setup refactoring, keep compatibility for now and report the follow-up work. Restore the setting and its comment if validation still fails, cannot run, or leaves uncertainty about behavior. Undo only cleanup-specific trial edits; preserve completed migration fixes and unrelated work.
4. Run the full validation commands again with the accepted removals together. Report each candidate's config path, removed or retained status, code changes, commands and results, and the reason for retaining it. Distinguish a deferred rewrite from a setting you could not validate.

For projects that use vp pack, also review the generated "tsdown <0.23 compatibility" settings after a passing library build. Use the migration diff and linked comments to distinguish inserted settings from pre-existing user choices. Removing deps.resolveDepSubpath: true preserves external subpath imports as written; check that consumers can still resolve the emitted imports. Removing attw.profile: 'strict' adopts the esm-only profile, which skips node10 and CommonJS resolution checks. Keep strict if those checks are part of the package's intended support. Do not drop intended declaration checks merely to make a build pass. Remove one setting and its generated comment at a time, then run vp pack and the package's consumer checks. Restore the setting and comment if validation fails or the required consumer behavior is unclear. Report which settings remain and why.

Report the migration changes, validation results, retained compatibility settings, and unresolved findings. Do not commit or push unless I ask.
Skip to content

Первые шаги ​

Vite+ — это унифицированный инструментарий и точка входа для веб-разработки.

Он объединяет Vite, Vitest, Oxlint, Oxfmt, Rolldown, tsdown и Vite Task в одном пакете vite-plus, обеспечивая чрезвычайно быстрый инструментарий для фронтенд-разработки.

Vite+ также поставляется с глобальным CLI vp, который управляет Node.js и менеджерами пакетов и упрощает использование Vite+ в разных проектах. Вы можете использовать любой из CLI независимо, но мы рекомендуем использовать их вместе.

Если у вас уже есть проект на Vite, выполните vp migrate, чтобы перенести его на Vite+, или передайте своему агенту для написания кода наш промпт для миграции.

Разрабатываете с помощью ИИ-ассистента? Просмотрите и скопируйте промпт для создания нового проекта, миграции существующего проекта или обновления Vite+:

Установка vp глобально ​

Приведённые ниже команды устанавливают глобальный CLI vp, который управляет Node.js и менеджерами пакетов и делает vp доступным во всех проектах. Если вам нужен только фронтенд-инструментарий в одном проекте, вместо этого можно установить локальный CLI проекта.

macOS / Linux ​

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

Windows ​

powershell
irm https://vite.plus/ps1 | iex

Альтернативно, скачайте и запустите vp-setup.exe.

Предупреждение SmartScreen

vp-setup.exe ещё не подписан цифровой подписью. Ваш браузер может показать предупреждение при скачивании. Нажмите «...» → «Сохранить» → «Сохранить в любом случае», чтобы продолжить. Если Windows Defender SmartScreen заблокирует файл при запуске, нажмите «Дополнительные сведения» → «Выполнить в любом случае».

Сценарии установки и vp-setup.exe читают переменные окружения, такие как VP_VERSION и VP_HOME.

Если вы используете Nushell с пользовательскими каталогами XDG, перед установкой ознакомьтесь с требованиями Nushell при запуске.

После установки откройте новый терминал и выполните:

bash
vp help

ИНФОРМАЦИЯ

Vite+ будет управлять вашей глобальной средой выполнения Node.js и менеджером пакетов. Если вы хотите отключить это поведение, выполните vp env off. Если вы решите, что Vite+ вам не подходит, введите vp implode, но, пожалуйста, поделитесь с нами своим отзывом.

Используете менее распространённую платформу (архитектуру процессора, ОС)?

Предварительно собранные бинарные файлы распространяются для следующих платформ (сгруппированы по уровням поддержки платформ Node.js v24):

  • Уровень 1
    • 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)
  • Уровень 2
    • Windows arm64 (aarch64-pc-windows-msvc)
  • Экспериментальные
    • Linux x64 musl (x86_64-unknown-linux-musl)
  • Другие
    • Linux arm64 musl (aarch64-unknown-linux-musl)

Если предварительно собранный бинарный файл недоступен для вашей платформы, установка завершится ошибкой.

На Alpine Linux (musl) вам нужно установить libstdc++ перед использованием Vite+:

sh
apk add libstdc++

Это требуется, потому что управляемая среда выполнения Node.js из неофициальных сборок зависит от стандартной библиотеки GNU C++.

Быстрый старт ​

После установки глобального CLI создайте проект, установите зависимости и используйте команды по умолчанию:

bash
vp create # Создать новый проект
vp install # Установить зависимости
vp dev # Запустить dev-сервер
vp check # Форматировать, линтить, проверять типы
vp test # Запустить JavaScript-тесты
vp build # Собрать для продакшена

Также можно запустить vp без аргументов, чтобы открыть интерактивную командную строку. В конфигурации, использующей только локальный CLI, запускайте те же команды через менеджер пакетов, например pnpm exec vp check.

Основные команды ​

Vite+ охватывает полный цикл фронтенд-разработки — от создания проекта до разработки, проверок, тестирования и сборки для продакшена. Большинство команд доступны в обоих вариантах; команды для управления окружением на уровне машины и самостоятельного управления требуют глобального CLI.

Установка проекта ​

  • vp create создаёт новые приложения, пакеты и монорепозитории.
  • vp migrate переносит существующие проекты на Vite+.
  • vp install устанавливает зависимости с помощью подходящего менеджера пакетов.
  • vp add, vp remove, vp update, vp dedupe, vp outdated, vp list, vp why и vp info охватывают остальные операции рабочего процесса управления пакетами.
  • vp link, vp unlink, vp rebuild и vp pm <command> предоставляют низкоуровневые операции менеджера пакетов.

Инструментарий проекта ​

  • vp check запускает форматирование, линтинг и проверку типов вместе.
  • vp lint и vp fmt напрямую запускают соответствующие проверки.
  • vp test запускает тесты с помощью Vitest.
  • vp dev запускает сервер разработки на базе Vite.
  • vp build собирает приложения, а vp preview позволяет локально просмотреть production-сборку.
  • vp pack собирает библиотеки или автономные артефакты.
  • vp toolchain показывает активный инструментарий проекта; используйте --global, чтобы вместо этого проверить глобальную установку.
  • vp run запускает задачи по рабочим пространствам с кэшированием.
  • vp cache clean очищает записи кэша задач.
  • vp exec запускает локальные бинарные файлы проекта, а vp dlx и vpx скачивают и запускают бинарные файлы пакетов.
  • vp config устанавливает диспетчер Git-хуков и настраивает интеграцию с агентами.
  • vp hooks управляет диспетчером Git-хуков, а vp staged запускает проверки для проиндексированных файлов.
  • Руководство по монорепозиториям посвящено структуре многопакетных проектов и соответствующим командам.

Глобальный CLI ​

  • vp env управляет окружением Node.js и менеджеров пакетов, а vp node запускает скрипты в определённом окружении.
  • vp upgrade обновляет саму глобальную установку vp.
  • vp implode удаляет глобальную установку vp и связанные с Vite+ данные с вашего компьютера.

Рабочий процесс ​

Справочник ​

  • Решение проблем посвящен распространённым проблемам с командами, конфигурацией и интеграцией.

ИНФОРМАЦИЯ

Vite+ поставляется с множеством предопределённых команд, таких как vp build, vp test и vp dev. Эти команды встроенные и не могут быть изменены. Если вы хотите запустить команду из сценариев package.json, используйте vp run <command> или vpr <command>.

Подробнее о vp run.