From 5cfa7c142a4b990d5bdd79f70638ca5d8cdea65d Mon Sep 17 00:00:00 2001 From: zyh Date: Tue, 23 Jul 2024 18:38:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E6=A3=80=E6=B5=8B=E7=BC=BA=E5=B0=91?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E4=BE=9D=E8=B5=96=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 ++ vite.config.js | 11 ++++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 9e42bc2..eba97bd 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,7 @@ "@tiptap/suggestion": "^2.2.3", "@tiptap/vue-3": "^2.2.3", "@vitejs/plugin-vue": "^5.0.5", + "@vueuse/core": "^10.11.0", "buffer-image-size": "^0.6.4", "core-js": "^3.8.3", "daisyui": "^3.2.1", @@ -101,6 +102,7 @@ "v-contextmenu": "^3.0.0", "vite": "^5.3.4", "vite-plugin-dts": "^1.2.1", + "vite-plugin-svg-icons": "^2.0.1", "vite-plugin-wasm": "^3.2.2", "vite-svg-loader": "^3.1.2", "vue": "^3.4.27", diff --git a/vite.config.js b/vite.config.js index 5bef340..984b1bf 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,6 +1,6 @@ import { defineConfig } from "vite"; import vue from "@vitejs/plugin-vue"; -const path = require("path"); +import { resolve } from "path"; import wasm from "vite-plugin-wasm"; import topLevelAwait from "vite-plugin-top-level-await"; import VueMacros from "unplugin-vue-macros/vite"; @@ -11,12 +11,9 @@ import { createSvgIconsPlugin } from "vite-plugin-svg-icons"; // https://vitejs.dev/config/ export default defineConfig({ resolve: { - alias: [ - { - find: "@", - replacement: path.resolve(__dirname, "src") - } - ] + alias: { + "@": resolve(__dirname, "/src") // 路径别名 + } }, plugins: [ VueMacros({ -- Gitee From 0c6a4b675689d5ce8333e1ad88e53b619dd9a088 Mon Sep 17 00:00:00 2001 From: zyh Date: Tue, 23 Jul 2024 18:52:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 4 ++++ vite.config.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index eba97bd..385d114 100644 --- a/package.json +++ b/package.json @@ -82,15 +82,19 @@ "docx": "^8.5.0", "file-saver": "^2.0.5", "jsbarcode": "^3.11.6", + "less": "^4.2.0", + "less-loader": "^12.2.0", "mitt": "^3.0.0", "print-js": "^1.6.0", "prosemirror-virtual-cursor": "^0.3.5", + "qrcode-svg": "^1.1.0", "react": "^16.14.0", "react-dom": "^16.14.0", "register-service-worker": "^1.7.2", "rfc6902": "^5.0.1", "rollup-plugin-copy": "^3.4.0", "svg64": "^2.0.0", + "tdesign-vue-next": "^1.9.8", "ts-lint": "^4.5.1", "ts-loader": "^9.4.2", "ts-morph": "^17.0.1", diff --git a/vite.config.js b/vite.config.js index 984b1bf..3fb1cca 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,6 +1,6 @@ import { defineConfig } from "vite"; import vue from "@vitejs/plugin-vue"; -import { resolve } from "path"; +import { fileURLToPath, URL } from "node:url"; import wasm from "vite-plugin-wasm"; import topLevelAwait from "vite-plugin-top-level-await"; import VueMacros from "unplugin-vue-macros/vite"; @@ -12,7 +12,7 @@ import { createSvgIconsPlugin } from "vite-plugin-svg-icons"; export default defineConfig({ resolve: { alias: { - "@": resolve(__dirname, "/src") // 路径别名 + "@": fileURLToPath(new URL("./src", import.meta.url)) } }, plugins: [ -- Gitee