Overview:
The vue3-uniapp-template is a high-performance template for Vue 3, featuring Vite, pnpm, and esbuild. It offers various features such as automated component loading, a multi-platform persistence solution using pinia, a flexible CSS engine called UnoCSS, and a wide range of icons. It also supports the new <script setup> syntax, automatic API loading using the Composition API, TypeScript, ESLint, and stylelint for code quality, as well as tools for code formatting and organization. Additionally, it provides features like request interception, image compression, and separate configuration for different environments.
Features:
- Vue 3, Vite, pnpm, esbuild: Utilizes the latest technologies for faster development and build process.
- Automated component loading: Components are automatically loaded for easier development.
- Pinia + multi-platform persistence: Offers a persistence solution using pinia that is compatible with multiple platforms.
- UnoCSS: A highly performant and flexible CSS engine.
- UnoCSS Icons: Provides a wide range of icons.
- New
<script setup>syntax: Supports the new syntax for easier coding. - Automatic API loading: APIs are automatically loaded using the Composition API, eliminating the need for manual imports.
- TypeScript & ESLint & stylelint: Ensures code quality and consistency using TypeScript, ESLint, and stylelint.
- Code organization and consistency: Automatically sorts ES6 imports and CSS properties for better coding consistency.
- Request interception: Provides request interception for easier request handling.
- Image compression: Automatically compresses images, eliminating the need for external tools.
- Environment configuration: Supports separate configuration for different environments.
Installation:
To install the vue3-uniapp-template, you can use one of the following methods:
- Pull the code from GitHub:
git clone https://github.com/fly-vue3-templates/vue3-uniapp-template fly-uniapp
- Pull the code from Gitee:
git clone https://gitee.com/fly-vue3-templates/vue3-uniapp-template.git fly-uniapp
- Use degit (without git initialized):
npx degit https://github.com/fly-vue3-templates/vue3-uniapp-template fly-uniapp
- Use degit (without git initialized):
npx degit https://gitee.com/fly-vue3-templates/vue3-uniapp-template fly-uniapp
To run the template on different platforms:
- Web platform: Run
pnpm dev:h5and open http://localhost:9000/ in your browser. - Weixin platform (微信): Run
pnpm dev:mp-weixinand open the project folder in WeChat Development Tool. Navigate todist/dev/mp-weixin. - To publish the template on different platforms:
- Web platform: Run
pnpm build:h5and find the built files indist/build/h5, which can be hosted on a web server. - Weixin platform (微信): Run
pnpm build:h5and find the built files indist/build/mp-weixin. Import the project in WeChat Development Tool and upload the project.
- Web platform: Run
Note: APP platform is not currently supported.
Summary:
The vue3-uniapp-template is a high-performance template for Vue 3, offering various features and optimizations for faster development. It utilizes the latest technologies such as Vite, pnpm, and esbuild and provides features like automated component loading, simplified API usage with the new <script setup> syntax, persistent state management, flexible CSS engine, and more. Additionally, it includes tools for code quality assurance, environment configuration, and image compression. Overall, this template provides a comprehensive and efficient foundation for developing Vue 3 applications.