Turns out we weren't optimizing these builds for size. We just merged a fix! We've also set the right content type on cloudflare to enable streaming/compression. The raw size is down to 13mb and the actual download size (with compression) is now 3.9mb.
https://github.com/bevyengine/bevy/pull/8636
Should roll out soon
I noticed the fox demo's wasm_example_bg.wasm is 22MB. That seems large? Is there code splitting?
Also, seems streaming is broken:
wasm_example.js:285 `WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.