From 2a658af5b99cb7e26b3fe90353f19a8f30a968f2 Mon Sep 17 00:00:00 2001 From: farion1231 Date: Sat, 23 Aug 2025 20:41:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E6=88=90=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E6=8E=A7=E5=88=B6=E5=92=8C=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新 tauri.conf.json 配置正确的前端构建路径 - 调整开发服务器端口为 Vite 默认端口 5173 - 添加 Tauri 前端依赖包 - 窗口拖拽样式已兼容 --- package.json | 1 + pnpm-lock.yaml | 10 ++++++++++ src-tauri/tauri.conf.json | 8 ++++---- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 2bf8841..011a68d 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ }, "dependencies": { "@tauri-apps/api": "^2.8.0", + "@tauri-apps/plugin-shell": "^2.3.0", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f6de98d..aef67d7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: '@tauri-apps/api': specifier: ^2.8.0 version: 2.8.0 + '@tauri-apps/plugin-shell': + specifier: ^2.3.0 + version: 2.3.0 react: specifier: ^18.2.0 version: 18.3.1 @@ -460,6 +463,9 @@ packages: '@tauri-apps/api@2.8.0': resolution: {integrity: sha512-ga7zdhbS2GXOMTIZRT0mYjKJtR9fivsXzsyq5U3vjDL0s6DTMwYRm0UHNjzTY5dh4+LSC68Sm/7WEiimbQNYlw==} + '@tauri-apps/plugin-shell@2.3.0': + resolution: {integrity: sha512-6GIRxO2z64uxPX4CCTuhQzefvCC0ew7HjdBhMALiGw74vFBDY95VWueAHOHgNOMV4UOUAFupyidN9YulTe5xlA==} + '@tootallnate/once@2.0.0': resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} engines: {node: '>= 10'} @@ -1984,6 +1990,10 @@ snapshots: '@tauri-apps/api@2.8.0': {} + '@tauri-apps/plugin-shell@2.3.0': + dependencies: + '@tauri-apps/api': 2.8.0 + '@tootallnate/once@2.0.0': {} '@types/babel__core@7.20.5': diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index ee0e374..3b2e0f4 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -4,10 +4,10 @@ "version": "3.0.0-beta.1", "identifier": "com.ccswitch.app", "build": { - "frontendDist": "../build", - "devUrl": "http://localhost:3000", - "beforeDevCommand": "pnpm dev", - "beforeBuildCommand": "pnpm build" + "frontendDist": "../dist", + "devUrl": "http://localhost:5173", + "beforeDevCommand": "pnpm run dev:renderer", + "beforeBuildCommand": "pnpm run build:renderer" }, "app": { "windows": [