trunk-rs / trunk

Build, bundle & ship your Rust WASM application to the web.

Home Page:https://trunkrs.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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