Platform agnostic #19

Merged
teidesu merged 25 commits from platform-agnostic into master 2024-03-07 05:54:20 +03:00
Showing only changes of commit fea8d93dcb - Show all commits

View file

@ -8,7 +8,10 @@ export function getWasmUrl(): URL {
// making it not work. probably related to https://github.com/vitejs/vite/issues/8427, // 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 // 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 // so we'll just use this hack for now
// @only-if-esm
return new URL('../mtcute.wasm', import.meta.url) return new URL('../mtcute.wasm', import.meta.url)
// @/only-if-esm
throw new Error('ESM-only')
} }
let wasm!: MtcuteWasmModule let wasm!: MtcuteWasmModule