From this article https://asquera.de/blog/2018-10-01/webassembly-and-wasm-bindgen/ I found we can run wasm-bindgen target/wasm32-unknown-unknown/release/qr_wasm.wasm --out-dir ./dist --no-modules --no-typescript
to create wasm and js files without running wasm-pack build
(it would install wasm-bindgen regardless if I have previously installed one, making it a bit slow) which seems more flexible to me but when I ran wasm-bindgen xxx
it says: zsh: command not found: wasm-bindgen
I googled it but no one seems to have encountered this issue. I also have cargo install
wasm-bindgen and wasm-bindgen-cli in my project.