diff --git a/src/emulator.ts b/src/emulator.ts index 8604518..f7c3a4c 100644 --- a/src/emulator.ts +++ b/src/emulator.ts @@ -205,13 +205,13 @@ export class Emulator { if (!jsBlobUrl) { return } - const { getEmscripten } = await (() => { + const { getEmscripten } = await (async () => { try { - return import(/* @vite-ignore */ /* webpackIgnore: true */ jsBlobUrl) + return await import(/* @vite-ignore */ /* webpackIgnore: true */ jsBlobUrl) } catch { // a dirty hack for using with SystemJS, for example, in StackBlitz // eslint-disable-next-line no-eval - return eval('import(jsBlobUrl)') + return await eval('import(jsBlobUrl)') } })() URL.revokeObjectURL(jsBlobUrl) diff --git a/src/nostalgist.ts b/src/nostalgist.ts index efb7ef0..6ac1526 100644 --- a/src/nostalgist.ts +++ b/src/nostalgist.ts @@ -39,6 +39,8 @@ function baseName(url: string) { } export class Nostalgist { + static Nostalgist: Nostalgist + private static globalOptions = getDefaultOptions() private options: NostalgistOptions