diff --git a/packages/wasm/src/index.ts b/packages/wasm/src/index.ts index fcbca22d..9949785b 100644 --- a/packages/wasm/src/index.ts +++ b/packages/wasm/src/index.ts @@ -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