tailscale_tun.wasm to be instantiated without streaming (MIME type)

This commit is contained in:
Carlo Piovesan 2022-10-04 15:28:52 +02:00
parent 0a1d4a8602
commit 6119c6ee7e

View file

@ -29,7 +29,7 @@ export async function init() {
const lazyRunIpn = async () => {
const wasmUrl = new URL("tailscale.wasm", import.meta.url);
const go = new window.Go();
let {instance} = await WebAssembly.instantiateStreaming(fetch(wasmUrl),go.importObject);
let {instance} = await fetch(wasmUrl).then(x => x.arrayBuffer()).then(x => WebAssembly.instantiate(x,go.importObject));
go.run(instance);
const sessionStateStorage = {