diff --git a/wasm-deploy/src/commands.rs b/wasm-deploy/src/commands.rs index c05d5e6..da27986 100644 --- a/wasm-deploy/src/commands.rs +++ b/wasm-deploy/src/commands.rs @@ -522,11 +522,10 @@ pub async fn optimize( .arg("-Oz") .arg("-o") .arg(settings.artifacts_dir.join(format!("{}.wasm", bin_name))) - .arg( - settings - .target_dir - .join(format!("wasm32-unknown-unknown/release/{bin_name}.wasm")), - ) + .arg(settings.target_dir.join(format!( + "wasm32-unknown-unknown/{}/{bin_name}.wasm", + settings.build_profile + ))) .spawn() .context( "Failed optimizing with user installed wasm-opt. \