From 2cd6bab58c408c06d48bb306495e637c12dc4c1a Mon Sep 17 00:00:00 2001 From: muwoo <2424880409@qq.com> Date: Tue, 21 Dec 2021 18:38:19 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E4=BF=AE=E5=A4=8Dwindows=20preload?= =?UTF-8?q?=20=E5=8A=A0=E8=BD=BD=E8=B7=AF=E5=BE=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/browsers/runner.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/browsers/runner.ts b/src/main/browsers/runner.ts index b9bb2dc..ef6e30a 100644 --- a/src/main/browsers/runner.ts +++ b/src/main/browsers/runner.ts @@ -15,14 +15,14 @@ const getPreloadPath = (plugin, pluginIndexPath) => { return path.resolve(__static, `../feature/public/preload.js`); } if (tplPath) { - return path.resolve(indexPath.replace("file:", ""), `./`, preload); + return path.resolve(getRelativePath(indexPath), `./`, preload); } - return path.resolve(pluginIndexPath.replace("file:", ""), `../`, preload); + return path.resolve(getRelativePath(pluginIndexPath), `../`, preload); } if (tplPath) { - return path.resolve(indexPath.replace("file:", ""), `./`, preload); + return path.resolve(getRelativePath(indexPath), `./`, preload); } - return path.resolve(pluginIndexPath.replace("file:", ""), `../`, preload); + return path.resolve(getRelativePath(pluginIndexPath), `../`, preload); }; export default () => {