fix: 修复安卓真机开发版连接与编译问题

This commit is contained in:
JSR
2026-03-28 09:16:43 +08:00
parent 16044829e7
commit 76341d41c3
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ pub async fn toggle_devtools(
let _ = app;
}
#[cfg(debug_assertions)]
#[cfg(all(debug_assertions, desktop))]
if let Some(window) = app.get_webview_window("main") {
if window.is_devtools_open() {
window.close_devtools();
+8
View File
@@ -18,8 +18,16 @@ export default defineConfig({
emptyOutDir: true,
},
server: {
host: process.env.TAURI_DEV_HOST || false,
port: 1420,
strictPort: true,
hmr: process.env.TAURI_DEV_HOST
? {
protocol: "ws",
host: process.env.TAURI_DEV_HOST,
port: 1421,
}
: undefined,
},
clearScreen: false,
})