# base-web-vue3 **Repository Path**: haojundd/base-web-vue3 ## Basic Information - **Project Name**: base-web-vue3 - **Description**: 基于vue3的基础前端项目 - **Primary Language**: TypeScript - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-07-18 - **Last Updated**: 2024-07-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: Vue, vue3, TypeScript ## README # base-web-vue3 This template should help get you started developing with Vue 3 in Vite. ## Recommended IDE Setup [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin). ## Type Support for `.vue` Imports in TS TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types. If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps: 1. Disable the built-in TypeScript Extension 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)` 2. Reload the VSCode window by running `Developer: Reload Window` from the command palette. ## Customize configuration See [Vite Configuration Reference](https://vitejs.dev/config/). ## Project Setup 推荐[安装 pnpm](https://pnpm.io/zh/installation) ```sh pnpm install ``` ### Compile and Hot-Reload for Development ```sh pnpm dev ``` ### Type-Check, Compile and Minify for Production ```sh pnpm build ``` ### 目录 ```text ├── public # 静态资源 ├── src │   ├── api # 接口 │   ├── assets # 图片资源 │   ├── components # 全局组件 │   ├── enums # 常量 │   ├── hooks # 钩子 │   ├── layout # 布局 │   ├── router # 路由 │   ├── store # 存储库 │   ├── styles # 全局样式 │   ├── types # 类型声明 │   ├── utils # 工具 │   ├── views # 所有页面 │   ├── App.vue # 入口页面 │   └── main.ts # 初始化 ├── .env # 环境变量 ├── .env.production # 生产环境变量 ├── .env.uat # UAT环境变量 ├── env.d.ts # 环境变量声明 ├── index.html # 入口文件 ├── tsconfig.json # typescript 配置 └── vite.config.ts # vite 配置 ```