Uni Vue3 Ts Template screenshot

Uni Vue3 Ts Template

Author Avatar Theme by Atqq
Updated: 20 Nov 2023
280 Stars

开箱即用的uni-app vue3 TS 工程化模板项目,支持小程序/H5/APP开发使用,包含pinia,sass/less,axios,vitest,eslint,Unocss

Categories

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:

  1. Ensure Node is installed and version is 18 or above.
  2. Use pnpm as the package manager for faster dependency installation.
  3. Install the required dependencies using the command pnpm install or pnpm install --shamefully-hoist if encountering errors during the dev build.
  4. If using a Mac M1 (ARM) chip, manually install the esbuild-darwin-64 version or command as provided.
  5. To launch the WeChat mini-program, delete the node_modules folder and run pnpm install --shamefully-hoist again. Then, run pnpm dev:mp-weixin to start the development server. Refer to the detailed documentation for more information.
  6. 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-weixin into the WeChat developer tool to run it.
  7. 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.