Skip to main content

resolve_out_dir

Function resolve_out_dir 

Source
pub fn resolve_out_dir(args: &ModeArgs) -> PathBuf
Expand description

Resolves the output directory for wasm-pack artifacts.

Uses --out-dir from wasm-pack args if specified, otherwise defaults to {www_dir}/pkg so that build artifacts are placed directly inside the www directory served by the development server.

§Arguments

  • &ModeArgs - The CLI arguments containing crate_path, www_dir, and wasm_pack_args.

§Returns

  • PathBuf - The resolved output directory (absolute if crate_path is joined).