mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-10 13:20:28 +08:00
bugfix: 修复windows preload 加载路径错误
This commit is contained in:
parent
581599614b
commit
2cd6bab58c
@ -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 () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user