refactor: support proxy option

This commit is contained in:
jeasonnow
2024-07-30 16:54:36 +08:00
parent a631e117ca
commit 5752996f89
7 changed files with 17 additions and 3 deletions

View File

@@ -24,6 +24,7 @@ export async function mergeConfig(url: string, options: PakeAppOptions, tauriCon
name,
resizable = true,
inject,
proxyUrl,
} = options;
const { platform } = process;
@@ -189,6 +190,8 @@ export async function mergeConfig(url: string, options: PakeAppOptions, tauriCon
await fsExtra.writeFile(injectFilePath, '');
}
tauriConf.pake.proxy_url = proxyUrl || "";
// Save config file.
const platformConfigPaths: PlatformMap = {
win32: 'tauri.windows.conf.json',