# vue3+vite 后台系统基础模型配置 **Repository Path**: drop-by-drop/init-pc-vite-v3 ## Basic Information - **Project Name**: vue3+vite 后台系统基础模型配置 - **Description**: 项目基础服务选型为vue3+vite 作为简介版pc后台模板 无需配置一键启动 - **Primary Language**: JavaScript - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-04-22 - **Last Updated**: 2022-05-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 项目描述 The project infrastructure is VUE3 and Vite As the infrastructure for the current project 项目基础服务选型为vue3+vite 作为当前项目基础设施建设 ## Environment Prepare install `node_modules`: 下载依赖项 ```bash npm install ``` or ```bash yarn ``` ## Provided Scripts vue3-vite-init provides some useful script to help you quick start and build with web project, code style check and test. Scripts provided in `package.json`. It's safe to modify or add additional script: ## use import notice import引入说说明: -- 工具类统一放在tool文件夹下 引入路径 'tool/...js' -- 页面统一放在views文件夹下 引入路径 'views/....vue' -- 组件统一放在components文件夹下 引入路径 'com/....vue' -- 接口统一放在pais文件夹下 引入路径 'pais/....js' -- 如果你还没有理解打包配置请勿修改文件夹名称因为这会导致无法预料的问题 Do not change the folder name if you do not understand the packaging configuration as this can cause unexpected problems ## env .env.development --开发环境 .env.production --正式环境 .env.test --生产环境 VITE_APP_TITLE --当前环境项目名称 用于浏览器头部展示 NODE_ENV --当前环境名称 VITE_APP_API_URL --当前环境域名 其中三个文件的 VITE_APP_TITLE 和 VITE_APP_API_URL 是必须要配置的 ## scripts npm run dev --本地运行开发环境 npm run test --本地运行测试环境 npm run prod --本地运行正式环境 npm run build --打包正式环境 npm run build:dev --打包开发环境 npm run build:test --打包测试环境 npm run preview --运行本地打包后的项目 在这之前必须已经使用过打包命令 ## 说明 vite.config.js 文件serverproxy代理自己根据需要配置 项目中使用使用当前环境域名使用 ==import.meta.env.VITE_APP_API_URL== 获取