Open JonasAlaif opened 11 months ago
Every major browser supports it so I don't see the need to keep the no-modules around. There is no user code that needs to be updated, as far as I'm aware, as all the JS is generated by wasm-bindgen and it calls WASM.
I've changed the default to spawn the worker as a module (which means that this will be a breaking change), but I think it's worthwhile keeping the old behavior around for backwards compatibility reasons.
Ready to merge now. Will be a breaking change regardless, since both the public API of spawner is changed as well as the default as_module
is changed.
@hamza1311 or @futursolo if you have time :)
This is ready to be merged @hamza1311 @futursolo
I really need this PR. Any timeline when it will be available?
@ranile any chance you could have a look at merging this? Hopefully there aren't any conflicts in the meantime
Workers created with the
--target web
flag must be spawned as a module. This adds the option to do that, alleviating the current--target no-modules
missing features described here. I will create a linked PR in trunk to add an option to create workers with this flag.