table of contents
| WASM-PACK(1) | User Commands | WASM-PACK(1) |
NAME¶
wasm-pack build - ??????? build your npm package!
SYNOPSIS¶
wasm-pack build [OPTIONS] [PATH] [EXTRA_OPTIONS]...
DESCRIPTION¶
??????? build your npm package!
Arguments:¶
- [PATH]
- The path to the Rust crate. If not set, searches up the path from the current directory
- [EXTRA_OPTIONS]...
- List of extra options to pass to `cargo build`
OPTIONS¶
- -s, --scope <SCOPE>
- The npm scope to use in package.json, if any
- -m, --mode <MODE>
- Sets steps to be run. [possible values: no-install, normal, force] [default: normal]
- --no-typescript
- By default a *.d.ts file is generated for the generated JS file, but this flag will disable generating this TypeScript file
- --weak-refs
- Enable usage of the JS weak references proposal
- --reference-types
- Enable usage of WebAssembly reference types
- -t, --target <TARGET>
- Sets the target environment. [possible values: bundler, nodejs, web, no-modules, deno] [default: bundler]
- --debug
- Deprecated. Renamed to `--dev`
- --dev
- Create a development build. Enable debug info, and disable optimizations
- --release
- Create a release build. Enable optimizations and disable debug info
- --profiling
- Create a profiling build. Enable optimizations and debug info
- --profile <PROFILE>
- User-defined profile with --profile flag
- -d, --out-dir <OUT_DIR>
- Sets the output directory with a relative path [default: pkg]
- --out-name <OUT_NAME>
- Sets the output file names. Defaults to package name
- --no-pack
- Option to not generate a package.json
- --no-opt
- Option to skip optimization with wasm-opt
- -h, --help
- Print help
| February 2026 | wasm-pack build 0.14.0+ds |