fix(worker-build): prevent script will never generate a response
This fixes https://github.com/cloudflare/workers-rs/issues/255
There's no clean way to convert the index_bg.js which contains ESM exports, into a function which is called on each fetch().
So in this PR, I basically split the two parts of the bundle up and move the initialization inside the fetch function, by replacing the INSERT_INIT() token
This is kinda hacky, but it works. It fixes the script will never generate a response errors that can occur when sharing the wasm state across requests.
ping @zebp i wonder if you know who to hit up to get this in, this is blocking me from using worker-rs
ping @zebp i wonder if you know who to hit up to get this in, this is blocking me from using worker-rs
left a reply in the issue
Is there any update on this?