Skip to content

Commit 0cc220d

Browse files
committed
fix: cannot get ts module in prod env
1 parent f5ddb38 commit 0cc220d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/monaco/vue.worker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async function importTsFromCdn(tsVersion: string) {
9595
;(globalThis as any).module = { exports: {} }
9696
const tsUrl = `https://cdn.jsdelivr.net/npm/typescript@${tsVersion}/lib/typescript.js`
9797
await import(/* @vite-ignore */ tsUrl)
98-
const ts = module.exports
98+
const ts = globalThis.module.exports
9999
globalThis.module = _module
100100
return ts as typeof import('typescript')
101101
}

0 commit comments

Comments
 (0)