Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/lib/apiManagerProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,9 @@ class ApiManagerProxy extends MTProtoMessagePort {

// @mtcute/wasm resolves its wasm via `new URL('mtcute-*.wasm', import.meta.url)`,
// which throws against the blob: URL these proxy workers run from. Make the hashed
// filenames absolute so import.meta.url is irrelevant.
text = text.replace(/(["'])(mtcute(?:-simd)?-[\w-]+\.wasm)/g, '$1' + pre + '$2');
// filenames absolute so import.meta.url is irrelevant. The minifier emits the literal
// as a backtick template string, so the quote class must include it.
text = text.replace(/(["'`])(mtcute(?:-simd)?-[\w-]+\.wasm)/g, '$1' + pre + '$2');

const blob = new Blob([text], { type: 'application/javascript' });
return blob;
Expand Down
Loading