A modern build toolchain for WeChat Mini Programs based on Vite (v6.x). Supports TypeScript, SCSS/LESS, Vue 3 SFC with full template syntax (v-if, v-for, v-model), scoped CSS, dynamic components, KeepAlive, and HMR. Current stable version 6.15.17, released as patches weekly. Key differentiators: first-class Vue 3 integration in mini-program environment, Vite plugin ecosystem compatibility, built-in screenshot/comparison CLI, and AI-agent-friendly local docs. Requires Node >=20.19.0 or >=22.12.0.
npm install weapp-viteVerified import paths — ran on the pinned version, not inferred.
Showcases a minimal weapp-vite config enabling Vue support and a Vue SFC component with template, script setup, and scoped styles.
Upgrade Node.js to ^20.19.0 or ^22.12.0; use nvm or fnm to manage versions.
Ensure weapp-vite is listed as a devDependency and run via npx (npx wv build) or a package.json script.
Update to >=6.15.15 and review code that relied on the throw behavior; add default values where needed.
Check the pending reason in build logs; use '--hmr-profile' to analyze slow points.
Run 'npm install weapp-vite --save-dev' and use 'import { defineConfig } from 'weapp-vite/config''.Use ESM import: 'import { defineConfig } from 'weapp-vite/config''. Do not use require().Upgrade to Node.js 20.19.0+ or 22.12.0+ (e.g., using nvm: nvm install 22.12.0).