diff --git a/src/monaco/vue.worker.ts b/src/monaco/vue.worker.ts index 75b90aac..079838e3 100644 --- a/src/monaco/vue.worker.ts +++ b/src/monaco/vue.worker.ts @@ -95,7 +95,7 @@ async function importTsFromCdn(tsVersion: string) { ;(globalThis as any).module = { exports: {} } const tsUrl = `https://cdn.jsdelivr.net/npm/typescript@${tsVersion}/lib/typescript.js` await import(/* @vite-ignore */ tsUrl) - const ts = module.exports + const ts = globalThis.module.exports globalThis.module = _module return ts as typeof import('typescript') }