mirror of
https://github.com/element-hq/element-desktop
synced 2025-03-13 15:58:41 +01:00
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) {
|
for (const s of HAKSCRIPTS) {
|
||||||
if (hakJson.scripts?.[s]) {
|
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) {
|
if (scriptModule.default) {
|
||||||
deps[dep].scripts[s] = scriptModule.default;
|
deps[dep].scripts[s] = scriptModule.default;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user