I'm writing a wasm library that I want to be available in both the browser and Node. Does this mean I need to run both wasm-pack publish -t bundler and wasm-pack publish -t node? Is there a way to publish both builds under the same package instead of publishing both mylib-node and mylib-browser?
This should be a fairly simple task (this library doesn't rely on any browser-specific stuff) but I've been unable to find a recommended example workflow.
After investigating a bit, as this seems a natural feature, I found that this issue is discussed and expected on the wasm-pack github, and there seems to be work done towards a
--target allthat would do exactly what you say, but we are not there now, apparently.There were some suggestions that seemed to work, especially this script: