From 950b85e1e9bb934698b0a00ea4abe722a3cc84ff Mon Sep 17 00:00:00 2001 From: DEV_DSW <562304744@qq.com> Date: Thu, 25 Sep 2025 17:07:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/.env.development | 3 +++ build/.env.production | 3 +++ electron.vite.config.ts | 6 ++++++ package.json | 2 +- 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 build/.env.development create mode 100644 build/.env.production diff --git a/build/.env.development b/build/.env.development new file mode 100644 index 0000000..33d6d60 --- /dev/null +++ b/build/.env.development @@ -0,0 +1,3 @@ +RENDERER_NODE_ENV = development +RENDERER_VUE_APP_PROXY = true +RENDERER_VUE_APP_API_BASEURL = http://192.1687.2:9999 diff --git a/build/.env.production b/build/.env.production new file mode 100644 index 0000000..6d7a1b0 --- /dev/null +++ b/build/.env.production @@ -0,0 +1,3 @@ +RENDERER_NODE_ENV = production +RENDERER_VUE_APP_PROXY = true +RENDERER_VUE_APP_API_BASEURL = http://192.1687.2:9999 diff --git a/electron.vite.config.ts b/electron.vite.config.ts index 4490776..0297b45 100644 --- a/electron.vite.config.ts +++ b/electron.vite.config.ts @@ -2,6 +2,9 @@ import { resolve } from 'path' import { defineConfig, externalizeDepsPlugin, bytecodePlugin } from 'electron-vite' import vue from '@vitejs/plugin-vue' +const publicDir = resolve('resources') +const envDir = resolve('build') + export default defineConfig({ main: { plugins: [externalizeDepsPlugin(), bytecodePlugin()] @@ -10,6 +13,9 @@ export default defineConfig({ plugins: [externalizeDepsPlugin(), bytecodePlugin()] }, renderer: { + publicDir, + envDir, + envPrefix: 'RENDERER_', resolve: { alias: { '@renderer': resolve('src/renderer/src'), diff --git a/package.json b/package.json index 76fa6f7..e5eac4a 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "electron-updater": "^6.3.9", "element-plus": "^2.11.3", "pinia": "^3.0.3", - "vue-qrcode": "^2.2.2", + "vue-qrcode": "^2.2.2", "vue-router": "^4.5.1" }, "devDependencies": {