Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build target documentation missing no-modules #452

Closed
petr-tik opened this issue Nov 28, 2018 · 1 comment
Closed

build target documentation missing no-modules #452

petr-tik opened this issue Nov 28, 2018 · 1 comment

Comments

@petr-tik
Copy link

petr-tik commented Nov 28, 2018

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 a target argument. According to the help message:

wasm-pack build -h | rg target`
    -t, --target <target>      Sets the target environment. [possible values: browser, nodejs] [default: browser]

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 webpack

https://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)

@petr-tik
Copy link
Author

People developing this - thank you for your good work. It's a duplicate - closing.

Opened an issue, forked the repo, so I can open a quick PR, found that the issue below raised it and it has been fixed
#416

Looking forward to the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant