You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The source code in the src/bindgen.rs passes the --target flag to wasm-bindgen, which also takes a third value - no-modules to build a wasm library that can be shipped without webpack
Documentation of wasm-pack build doesn't show one of the available target options for wasm-bindgen.
🐛 Bug description
The
wasm-pack build
command takes atarget
argument. According to the help message:Only 2 values are possible - browser or nodejs.
🤔 Expected Behavior
The source code in the
src/bindgen.rs
passes the --target flag to wasm-bindgen, which also takes a third value -no-modules
to build a wasm library that can be shipped without webpackhttps://github.com/rustwasm/wasm-pack/blob/master/src/bindgen.rs#L175-L178
Running
$$$$ wasm-pack build -t no-modules
works as expected, so we should add a line to the documentation or even generate documentation automatically.
🌍 Your environment
Include the relevant details of your environment.
wasm-pack version: wasm-pack-build 0.5.1
rustc version: rustc 1.31.0-nightly (3e6f30ec3 2018-10-26)
This will help
Other non-web developers, who don't know how to set up webpack and prefer to build wasm to small JS bundles that they can ship manually.
rustwasm/wasm-bindgen#1034 (comment)
The text was updated successfully, but these errors were encountered: