*Can't use dynamic import with esbuild
This commit is contained in:
parent
c5d761b3ae
commit
2cf5d6efb0
|
@ -93,15 +93,16 @@ export async function load(
|
||||||
} as ModuleBag;
|
} as ModuleBag;
|
||||||
}
|
}
|
||||||
|
|
||||||
const pkgName =
|
const pkg =
|
||||||
typeof window !== "undefined" && window?.document
|
typeof window !== "undefined" && window?.document
|
||||||
? "libkernel"
|
? await import("libkernel")
|
||||||
: "libkmodule";
|
: await import("libkmodule");
|
||||||
|
|
||||||
const pkg = await import(pkgName);
|
|
||||||
callModule = pkg.callModule;
|
callModule = pkg.callModule;
|
||||||
connectModule = pkg.connectModule;
|
connectModule = pkg.connectModule;
|
||||||
|
// @ts-ignore
|
||||||
log = pkg.log;
|
log = pkg.log;
|
||||||
|
// @ts-ignore
|
||||||
logErr = pkg.logErr;
|
logErr = pkg.logErr;
|
||||||
|
|
||||||
return load(module);
|
return load(module);
|
||||||
|
|
Reference in New Issue