From 1b5b326aa6c21dbd8948ffc9aac0909964355805 Mon Sep 17 00:00:00 2001 From: Jimmy <1064425721@qq.com> Date: Tue, 11 Apr 2023 11:37:51 +0800 Subject: [PATCH] fix : tsconfig include electron (#134) (#135) --- electron/main/index.ts | 2 +- electron/main/update.ts | 2 +- tsconfig.json | 2 +- tsconfig.node.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/electron/main/index.ts b/electron/main/index.ts index 0deb058..112c80d 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -55,7 +55,7 @@ async function createWindow() { }, }) - if (process.env.VITE_DEV_SERVER_URL) { // electron-vite-vue#298 + if (url) { // electron-vite-vue#298 win.loadURL(url) // Open devTool if the app is not packaged win.webContents.openDevTools() diff --git a/electron/main/update.ts b/electron/main/update.ts index 759f086..db946a4 100644 --- a/electron/main/update.ts +++ b/electron/main/update.ts @@ -63,7 +63,7 @@ export function update(win: Electron.BrowserWindow) { } function startDownload( - callback: (error: Error | null, info: ProgressInfo) => void, + callback: (error: Error | null, info: ProgressInfo | null) => void, complete: (event: UpdateDownloadedEvent) => void, ) { autoUpdater.on('download-progress', info => callback(null, info)) diff --git a/tsconfig.json b/tsconfig.json index 0bc7d9a..c9c4765 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,6 +22,6 @@ ] }, }, - "include": ["src"], + "include": ["src", "electron"], "references": [{ "path": "./tsconfig.node.json" }] } diff --git a/tsconfig.node.json b/tsconfig.node.json index ed1b586..1e7e7d6 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -6,5 +6,5 @@ "resolveJsonModule": true, "allowSyntheticDefaultImports": true }, - "include": ["vite.config.ts", "package.json", "electron"] + "include": ["vite.config.ts", "package.json"] }