forked from CringeStudios/element-desktop
Fix hak script import in tsx esm for Windows (#2125)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
0ae3f235b7
commit
687e89f54f
@ -90,7 +90,8 @@ async function main(): Promise<void> {
|
||||
|
||||
for (const s of HAKSCRIPTS) {
|
||||
if (hakJson.scripts?.[s]) {
|
||||
const scriptModule = await import(path.join("file://", prefix, "hak", dep, hakJson.scripts[s]));
|
||||
// Shockingly, using path.join and backslashes here doesn't work on Windows
|
||||
const scriptModule = await import(`../../hak/${dep}/${hakJson.scripts[s]}`);
|
||||
if (scriptModule.default) {
|
||||
deps[dep].scripts[s] = scriptModule.default;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user