
mpvue
A framework for building WeChat and other mini programs using Vue.js syntax.
- Stars
- 20.2k
- Forks
- 2k
- Licence
- MIT
- Language
- JavaScript
- Last update
- 4.7 years ago
- Type
- Library
No commits in over a year — check for forks or alternatives before adopting.
What it is
mpvue is a front-end framework that lets developers write mini programs (small apps inside WeChat, Baidu, Toutiao and Alipay) using Vue.js. It is forked from Vue 2.4.1, with its runtime and compiler changed so the code runs in mini program environments. The README says it brings the Vue.js development experience to mini program development.
- Build a WeChat mini program page structure using Vue single-file component syntax
- Use Vuex to manage shared state across pages in a mini program
- Convert parts of an existing H5 (mobile web) codebase into mini program code, as the README describes
Great for
- Developers who already know Vue.js and want to build WeChat mini programs
- Teams with existing Vue.js components who want to reuse code in mini programs
- Projects that need webpack-based builds, Vuex state management, or npm dependencies in mini programs
Not ideal for
- Teams starting a new project today: the README's latest release is 1.4.4 and the last push was in March 2022, so ongoing maintenance is unclear
- Developers who want the official WeChat framework only, since mpvue is a third-party layer on top of it
- Projects that need Vue 3 features, because mpvue is based on Vue 2.4.1
How to get it
- 1
Install with a package manager
You'll need: Node.js · npm
Install the mpvue package from npm
npm install mpvue - 2
Run it
- Create a project from the mpvue-quickstart template, as described in the README's quickstart link
- Open the project in the WeChat (or other supported) developer tool
- Edit the Vue components and view the result in the mini program simulator
- 3
Get the most out of it
- Use mpvue-loader and mpvue-webpack-target for webpack builds, as listed in the README
- Use postcss-mpvue-wxss and px2rpx-loader to handle style conversion
- Use mpvue-simple to speed up creating single Page or Component mini program pages
- Use Vuex for shared state in larger apps, as the README suggests
Downloads
Strengths
- Familiar Vue.js syntax and component model for Vue developers
- Supports several mini program platforms: WeChat, Baidu, Toutiao and Alipay
- Works with webpack, npm packages, and the vue-cli tooling
Trade-offs
- Based on an old Vue.js version (2.4.1) and the repository has not been pushed since March 2022
- Depends on the mini program platform's rules and tooling, which may change over time
- Limited detail in the README on current compatibility with newer mini program platform versions
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| mpvue (this) | 20.2k | Library | intermediate | 4.7 years ago | Developers who already know Vue.js and want to build WeChat mini programs |
| vant-weapp | 18.5k | Library | intermediate | 27 days ago | Developers building WeChat Mini Programs who want ready-made UI components |
| vux | 17.4k | Library | intermediate | 4 months ago | Developers building mobile web pages with Vue 2 |
| better-scroll | 16.4k | Library | intermediate | 2.4 years ago | Front-end developers building mobile web lists or scrollable panels |
| mint-ui | 16.4k | Library | intermediate | 4.7 years ago | Developers building mobile-style web pages or apps with Vue 2 |
| coloruicss | 12.4k | Library | beginner | 2.6 years ago | Developers building WeChat mini programs who want quick, colorful styling |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.