Scroll to navigation

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

The npm scope to use in package.json, if any
Sets steps to be run. [possible values: no-install, normal, force] [default: normal]
By default a *.d.ts file is generated for the generated JS file, but this flag will disable generating this TypeScript file
Enable usage of the JS weak references proposal
Enable usage of WebAssembly reference types
Sets the target environment. [possible values: bundler, nodejs, web, no-modules, deno] [default: bundler]
Deprecated. Renamed to `--dev`
Create a development build. Enable debug info, and disable optimizations
Create a release build. Enable optimizations and disable debug info
Create a profiling build. Enable optimizations and debug info
User-defined profile with --profile flag
Sets the output directory with a relative path [default: pkg]
Sets the output file names. Defaults to package name
Option to not generate a package.json
Option to skip optimization with wasm-opt
Print help
February 2026 wasm-pack build 0.14.0+ds