优化本地文件打包功能

This commit is contained in:
Tlntin
2022-12-29 11:28:35 +08:00
parent 2f9e104b51
commit 6f921ebee4
2 changed files with 23 additions and 11 deletions

View File

@@ -83,7 +83,7 @@ export async function mergeTauriConfig(
tauriConf.pake.windows[0].url_type = "local";
const file_name = path.basename(url);
// const dir_name = path.dirname(url);
const url_path = path.join("dist/", file_name);
const url_path = path.join(npmDirectory,"dist/", file_name);
await fs.copyFile(url, url_path);
tauriConf.pake.windows[0].url = file_name;
tauriConf.pake.windows[0].url_type = "local";