*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;
|
||||
}
|
||||
|
||||
const pkgName =
|
||||
const pkg =
|
||||
typeof window !== "undefined" && window?.document
|
||||
? "libkernel"
|
||||
: "libkmodule";
|
||||
? await import("libkernel")
|
||||
: await import("libkmodule");
|
||||
|
||||
const pkg = await import(pkgName);
|
||||
callModule = pkg.callModule;
|
||||
connectModule = pkg.connectModule;
|
||||
// @ts-ignore
|
||||
log = pkg.log;
|
||||
// @ts-ignore
|
||||
logErr = pkg.logErr;
|
||||
|
||||
return load(module);
|
||||
|
|
Reference in New Issue