Overview:
The uni-vue3-ts-templateuni-app is a template project that supports Vue3, TypeScript, Vite, Pinia, and Unocss. It is compatible with various platforms such as H5, WeChat mini-program, iOS, and Android. The template includes features such as Vue3, Pinia (replacing Vuex), Axios, uView (a UI/component library), Vite, TypeScript, Sass, Less, ESLint, Prettier, Vitest (replacing Jest), and Unocss (an atomic CSS engine). It also provides installation instructions and suggestions for using pnpm as the package manager.
Features:
- Vue3
- Pinia - replaces Vuex
- Axios
- uView - vk-uview-ui (UI/component library)
- Vite
- TypeScript
- Sass
- Less
- ESLint
- Prettier
- Vitest - replaces Jest
- Unocss - an atomic CSS engine
- GitHooks - simple-git-hooks for Git hooks
Installation:
- Ensure Node is installed and version is 18 or above.
- Use pnpm as the package manager for faster dependency installation.
- Install the required dependencies using the command
pnpm installorpnpm install --shamefully-hoistif encountering errors during the dev build. - If using a Mac M1 (ARM) chip, manually install the esbuild-darwin-64 version or command as provided.
- To launch the WeChat mini-program, delete the
node_modulesfolder and runpnpm install --shamefully-hoistagain. Then, runpnpm dev:mp-weixinto start the development server. Refer to the detailed documentation for more information. - If encountering a blank screen with the error message “app.js - ReferenceError: regeneratorRuntime is not defined,” enable the enhanced compilation option in the WeChat mini-program IDE and import the resulting
dist/dev/mp-weixininto the WeChat developer tool to run it. - For troubleshooting a blank screen on a physical device while the simulator and development environment work fine, refer to issue 25 and use the resources built in production for debugging.
Summary:
The uni-vue3-ts-templateuni-app is a comprehensive template project that combines Vue3, TypeScript, Vite, Pinia, and Unocss. It supports multiple platforms such as H5, WeChat mini-program, iOS, and Android. The template includes various features and dependencies such as Vue3, Pinia (replacing Vuex), Axios, uView (UI/component library), Vite, TypeScript, Sass, Less, ESLint, Prettier, Vitest (replacing Jest), and Unocss (atomic CSS engine). The installation guide provides instructions for smooth setup, and troubleshooting tips are provided for specific issues.