yew workers broken since 0.18 due to minification: Can't find variable: wasm_bindgen
extrawurst opened this issue · comments
reproducer to our discord conversation:
run yew example: https://github.com/yewstack/yew/tree/master/examples/web_worker_prime
in release:
trunk serve --release --open
in the browser it will not work and show the following error in the console:
ReferenceError: Can't find variable: wasm_bindgen
in debug or with disabled minification it will work!
![Screenshot 2023-12-18 at 19 49 53](https://private-user-images.githubusercontent.com/776816/291381548-1968e36c-d491-42fc-9b1f-21b53b50ae34.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMxNzA1ODQsIm5iZiI6MTcyMzE3MDI4NCwicGF0aCI6Ii83NzY4MTYvMjkxMzgxNTQ4LTE5NjhlMzZjLWQ0OTEtNDJmYy05YjFmLTIxYjUzYjUwYWUzNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgwOVQwMjI0NDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01YzBjMThjNmMwNWRjY2MwMTNiMzQxNzg5NWNiZTlhN2Q3MTRjMjUzNGMyNjRkMGZhMDg5ZDViNjVhNTJjNmQyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.5UhEpswfYkVZ129i_Jf5fqsweFp4DKvyjYnmwqetgmw)