fix: only-if-esm for getWasmUrl
This commit is contained in:
parent
399336fa4a
commit
fea8d93dcb
1 changed files with 3 additions and 0 deletions
|
@ -8,7 +8,10 @@ export function getWasmUrl(): URL {
|
|||
// making it not work. probably related to https://github.com/vitejs/vite/issues/8427,
|
||||
// but asking the user to deoptimize the entire @mtcute/web is definitely not a good idea
|
||||
// so we'll just use this hack for now
|
||||
// @only-if-esm
|
||||
return new URL('../mtcute.wasm', import.meta.url)
|
||||
// @/only-if-esm
|
||||
throw new Error('ESM-only')
|
||||
}
|
||||
|
||||
let wasm!: MtcuteWasmModule
|
||||
|
|
Loading…
Reference in a new issue