From 8560646e759d7ce2668e4f674cf5aac8f224a01c Mon Sep 17 00:00:00 2001 From: Wang Chen Chen <932560435@qq.com> Date: Mon, 4 Dec 2023 15:32:14 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=8D=87=E7=BA=A7web-ui=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E8=87=B3=204.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +++ platform-web-ui/package.json | 53 +++++++++++++++--------------- platform-web-ui/prettier.config.js | 7 ++-- platform-web-ui/vite.config.ts | 9 +++-- tenant-web-ui/package.json | 53 +++++++++++++++--------------- tenant-web-ui/prettier.config.js | 7 ++-- tenant-web-ui/vite.config.ts | 8 +++-- 7 files changed, 79 insertions(+), 62 deletions(-) diff --git a/.gitignore b/.gitignore index a0b4a0b..1e13f73 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,10 @@ server/molly-service/src/main/resources/application-*.yml /server/molly-service/src/main/resources/application-*.yml ./server/molly-service/src/main/resources/application-*.yml +/platform-web-ui/pnpm-lock.yaml +/tenant-web-ui/pnpm-lock.yaml + + ### STS ### .apt_generated .classpath diff --git a/platform-web-ui/package.json b/platform-web-ui/package.json index 88e89d7..7c16a12 100644 --- a/platform-web-ui/package.json +++ b/platform-web-ui/package.json @@ -1,6 +1,6 @@ { "name": "v3-admin-vite", - "version": "4.2.4", + "version": "4.3.0", "description": "一个免费开源的中后台管理系统基础解决方案,基于 Vue3、TypeScript、Element Plus、Pinia 和 Vite 等主流技术", "author": { "name": "pany", @@ -11,6 +11,7 @@ "type": "git", "url": "https://github.com/un-pany/v3-admin-vite.git" }, + "type": "module", "scripts": { "dev": "vite", "build:stage": "vue-tsc --noEmit && vite build --mode staging", @@ -23,13 +24,13 @@ "test": "vitest" }, "dependencies": { - "@element-plus/icons-vue": "2.1.0", + "@element-plus/icons-vue": "2.3.1", "@stomp/stompjs": "^7.0.0", "@types/uuid": "^9.0.6", - "axios": "1.5.1", + "axios": "1.6.2", "dayjs": "1.11.10", "echarts": "^5.4.3", - "element-plus": "2.4.1", + "element-plus": "2.4.3", "js-base64": "^3.7.5", "lodash-es": "4.17.21", "mitt": "3.0.1", @@ -42,7 +43,7 @@ "screenfull": "6.0.2", "sockjs-client": "^1.6.1", "uuid": "^9.0.1", - "vue": "3.3.5", + "vue": "3.3.9", "vue-echarts": "^6.6.1", "vue-router": "4.2.5", "vxe-table": "4.4.1", @@ -50,33 +51,33 @@ "xe-utils": "3.5.11" }, "devDependencies": { - "@types/js-cookie": "3.0.5", - "@types/lodash-es": "4.17.10", - "@types/node": "20.8.7", - "@types/nprogress": "0.2.2", - "@types/path-browserify": "1.0.1", - "@typescript-eslint/eslint-plugin": "6.8.0", - "@typescript-eslint/parser": "6.8.0", - "@vitejs/plugin-vue": "4.4.0", - "@vitejs/plugin-vue-jsx": "3.0.2", + "@types/js-cookie": "3.0.6", + "@types/lodash-es": "4.17.12", + "@types/node": "20.10.2", + "@types/nprogress": "0.2.3", + "@types/path-browserify": "1.0.2", + "@typescript-eslint/eslint-plugin": "6.13.1", + "@typescript-eslint/parser": "6.13.1", + "@vitejs/plugin-vue": "4.5.1", + "@vitejs/plugin-vue-jsx": "3.1.0", "@vue/eslint-config-prettier": "8.0.0", "@vue/eslint-config-typescript": "12.0.0", - "@vue/test-utils": "2.4.1", - "eslint": "8.51.0", + "@vue/test-utils": "2.4.3", + "eslint": "8.55.0", "eslint-plugin-prettier": "5.0.1", - "eslint-plugin-vue": "9.17.0", - "jsdom": "22.1.0", - "lint-staged": "15.0.2", - "prettier": "3.0.3", - "sass": "1.69.4", - "typescript": "5.2.2", - "unocss": "0.56.5", - "vite": "4.5.0", + "eslint-plugin-vue": "9.19.2", + "jsdom": "23.0.1", + "lint-staged": "15.1.0", + "prettier": "3.1.0", + "sass": "1.69.5", + "typescript": "5.3.2", + "unocss": "0.57.7", + "vite": "5.0.4", "vite-plugin-svg-icons": "2.0.1", - "vite-svg-loader": "4.0.0", + "vite-svg-loader": "5.1.0", "vitest": "0.34.6", "vue-eslint-parser": "9.3.2", - "vue-tsc": "1.8.19" + "vue-tsc": "1.8.24" }, "lint-staged": { "*.{vue,js,jsx,ts,tsx}": [ diff --git a/platform-web-ui/prettier.config.js b/platform-web-ui/prettier.config.js index b38ea19..aae5844 100644 --- a/platform-web-ui/prettier.config.js +++ b/platform-web-ui/prettier.config.js @@ -1,5 +1,8 @@ -/** 配置项文档:https://prettier.io/docs/en/configuration.html */ -module.exports = { +/** + * 配置项文档:https://prettier.io/docs/en/configuration.html + * @type {import("prettier").Config} + */ +export default { /** 每一行的宽度 */ printWidth: 120, /** Tab 键的空格数 */ diff --git a/platform-web-ui/vite.config.ts b/platform-web-ui/vite.config.ts index b51acf4..e6a0cc3 100644 --- a/platform-web-ui/vite.config.ts +++ b/platform-web-ui/vite.config.ts @@ -22,8 +22,6 @@ export default (configEnv: ConfigEnv): UserConfigExport => { } }, server: { - /** 是否开启 HTTPS */ - https: false, /** 设置 host: true 才可以使用 Network 的形式,以 IP 访问项目 */ host: true, // host: "0.0.0.0" /** 端口号 */ @@ -41,10 +39,15 @@ export default (configEnv: ConfigEnv): UserConfigExport => { ws: true, /** 是否允许跨域 */ changeOrigin: true, - rewrite: (path) => path.replace("/api/v1", "") + rewrite: (path: string) => path.replace("/api/v1", "") } + }, + /** 预热常用文件,提高初始页面加载速度 */ + warmup: { + clientFiles: ["./src/{views,components}/*.vue"] } }, + build: { /** 单个 chunk 文件的大小超过 2048KB 时发出警告 */ chunkSizeWarningLimit: 2048, diff --git a/tenant-web-ui/package.json b/tenant-web-ui/package.json index 2215210..e396e47 100644 --- a/tenant-web-ui/package.json +++ b/tenant-web-ui/package.json @@ -1,6 +1,6 @@ { "name": "v3-admin-vite", - "version": "4.2.4", + "version": "4.3.0", "description": "一个免费开源的中后台管理系统基础解决方案,基于 Vue3、TypeScript、Element Plus、Pinia 和 Vite 等主流技术", "author": { "name": "pany", @@ -11,6 +11,7 @@ "type": "git", "url": "https://github.com/un-pany/v3-admin-vite.git" }, + "type": "module", "scripts": { "dev": "vite", "build:stage": "vue-tsc --noEmit && vite build --mode staging", @@ -23,13 +24,13 @@ "test": "vitest" }, "dependencies": { - "@element-plus/icons-vue": "2.1.0", + "@element-plus/icons-vue": "2.3.1", "@stomp/stompjs": "^7.0.0", "@types/uuid": "^9.0.6", - "axios": "1.5.1", + "axios": "1.6.2", "dayjs": "1.11.10", "echarts": "^5.4.3", - "element-plus": "2.4.1", + "element-plus": "2.4.3", "js-base64": "^3.7.5", "lodash-es": "4.17.21", "mitt": "3.0.1", @@ -41,7 +42,7 @@ "screenfull": "6.0.2", "sockjs-client": "^1.6.1", "uuid": "^9.0.1", - "vue": "3.3.5", + "vue": "3.3.9", "vue-echarts": "^6.6.1", "vue-router": "4.2.5", "vxe-table": "4.4.1", @@ -49,33 +50,33 @@ "xe-utils": "3.5.11" }, "devDependencies": { - "@types/js-cookie": "3.0.5", - "@types/lodash-es": "4.17.10", - "@types/node": "20.8.7", - "@types/nprogress": "0.2.2", - "@types/path-browserify": "1.0.1", - "@typescript-eslint/eslint-plugin": "6.8.0", - "@typescript-eslint/parser": "6.8.0", - "@vitejs/plugin-vue": "4.4.0", - "@vitejs/plugin-vue-jsx": "3.0.2", + "@types/js-cookie": "3.0.6", + "@types/lodash-es": "4.17.12", + "@types/node": "20.10.2", + "@types/nprogress": "0.2.3", + "@types/path-browserify": "1.0.2", + "@typescript-eslint/eslint-plugin": "6.13.1", + "@typescript-eslint/parser": "6.13.1", + "@vitejs/plugin-vue": "4.5.1", + "@vitejs/plugin-vue-jsx": "3.1.0", "@vue/eslint-config-prettier": "8.0.0", "@vue/eslint-config-typescript": "12.0.0", - "@vue/test-utils": "2.4.1", - "eslint": "8.51.0", + "@vue/test-utils": "2.4.3", + "eslint": "8.55.0", "eslint-plugin-prettier": "5.0.1", - "eslint-plugin-vue": "9.17.0", - "jsdom": "22.1.0", - "lint-staged": "15.0.2", - "prettier": "3.0.3", - "sass": "1.69.4", - "typescript": "5.2.2", - "unocss": "0.56.5", - "vite": "4.5.0", + "eslint-plugin-vue": "9.19.2", + "jsdom": "23.0.1", + "lint-staged": "15.1.0", + "prettier": "3.1.0", + "sass": "1.69.5", + "typescript": "5.3.2", + "unocss": "0.57.7", + "vite": "5.0.4", "vite-plugin-svg-icons": "2.0.1", - "vite-svg-loader": "4.0.0", + "vite-svg-loader": "5.1.0", "vitest": "0.34.6", "vue-eslint-parser": "9.3.2", - "vue-tsc": "1.8.19" + "vue-tsc": "1.8.24" }, "lint-staged": { "*.{vue,js,jsx,ts,tsx}": [ diff --git a/tenant-web-ui/prettier.config.js b/tenant-web-ui/prettier.config.js index b38ea19..aae5844 100644 --- a/tenant-web-ui/prettier.config.js +++ b/tenant-web-ui/prettier.config.js @@ -1,5 +1,8 @@ -/** 配置项文档:https://prettier.io/docs/en/configuration.html */ -module.exports = { +/** + * 配置项文档:https://prettier.io/docs/en/configuration.html + * @type {import("prettier").Config} + */ +export default { /** 每一行的宽度 */ printWidth: 120, /** Tab 键的空格数 */ diff --git a/tenant-web-ui/vite.config.ts b/tenant-web-ui/vite.config.ts index d6897e4..848ed52 100644 --- a/tenant-web-ui/vite.config.ts +++ b/tenant-web-ui/vite.config.ts @@ -22,8 +22,6 @@ export default (configEnv: ConfigEnv): UserConfigExport => { } }, server: { - /** 是否开启 HTTPS */ - https: false, /** 设置 host: true 才可以使用 Network 的形式,以 IP 访问项目 */ host: true, // host: "0.0.0.0" /** 端口号 */ @@ -41,8 +39,12 @@ export default (configEnv: ConfigEnv): UserConfigExport => { ws: true, /** 是否允许跨域 */ changeOrigin: true, - rewrite: (path) => path.replace("/api/v1", "") + rewrite: (path: string) => path.replace("/api/v1", "") } + }, + /** 预热常用文件,提高初始页面加载速度 */ + warmup: { + clientFiles: ["./src/{views,components}/*.vue"] } }, build: {