Skip to main content
weapp.js.org
Back to the stack
Stable
Taro / React migration
WeChatAlipayWebReactTaroVite

VPT

Vite for Taro projects

Use Vite for Taro development and builds instead of the older webpack pipeline. It connects existing React projects to the toolchain.

Maintained by: sep2 and contributors

Adjacent tools and runtime capabilities can be composed as needed without migrating an entire project at once.

VPT React source beside the app in WeChat DevTools with its counter at 5
Official HMR demo: the WeChat mini-app counter is already at 5 before the edit.

Install

ForFrontend teams that want to reuse React and Taro components and APIs while developing WeChat, Alipay, and Web apps with a modern Vite toolchain.

npm install -D vite-plugin-taro

Real runtime output

These images come from official project demos or regression baselines and are stored locally on this site.

VPT React source beside the app in WeChat DevTools with its counter at 5
Official HMR demo: the WeChat mini-app counter is already at 5 before the edit.
After VPT hot reload, the heading reads Hello and the counter remains at 5
After the edit in the same demo (cropped): the heading reads Hello and the counter remains at 5.

ENGINEERING PROOF

Taro + Vite migration

Start with a real config, command, or boundary note when deciding if this project fits your codebase.

package.jsonStable
npm create vite-taro@latest my-app

# keep React + Taro APIs
# move the build pipeline to Vite

Core capabilities

  • Vite 8 + React 19 + Taro 4
  • State-preserving hot reload
  • Automatic WeChat subpackages
  • Tailwind CSS v4 out of the box
  • WeChat Skyline rendering

Common use cases

  1. 01Create a cross-platform React project with npm create vite-taro@latest my-app
  2. 02Edit React components in WeChat DevTools while preserving page, component, and input state
  3. 03Plan WeChat mini-program subpackages automatically from standard static and dynamic imports

Platforms

WeChatAlipayWeb
Current version
v0.7.1
Sep 7, 2026
Weekly downloads
934
GitHub Stars
50

Frequently asked questions

How does VPT relate to Taro?

VPT is short for vite-plugin-taro. It uses Taro components, APIs, and runtime with Vite-powered development and builds instead of the older webpack pipeline.

Which platforms does VPT support?

VPT currently supports WeChat mini-programs, Alipay mini-programs, and the Web (H5), using the wx, zfb, and h5 build targets respectively.

How do I get started with VPT?

For a new project, run npm create vite-taro@latest my-app. For an existing Taro project, follow the official migration guide; installing the plugin still requires configuring Vite and project entries as documented.

Future documentation path

/docs/vite-plugin-taro/

This path will become canonical when aggregated documentation launches.

Analytics preferences

Baidu Analytics and Google Analytics are enabled by default on the production site to measure visits and limited interactions. You can turn them off at any time.