Skip to content

Commit

Permalink
fix(cli): used --dev by default with wasm-pack
Browse files Browse the repository at this point in the history
Without this argument, a different profile is used, so this actually
speeds up builds noticeably.
  • Loading branch information
arctic-hen7 committed Dec 26, 2021
1 parent 9246c12 commit 55cc681
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/perseus-cli/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub fn build_internal(
vec![&format!(
"{} build --target web {}",
env::var("PERSEUS_WASM_PACK_PATH").unwrap_or_else(|_| "wasm-pack".to_string()),
if is_release { "--release" } else { "" }
if is_release { "--release" } else { "--dev" } // If we don't supply `--dev`, another profile will be used
)],
&wb_target,
&wb_spinner,
Expand Down
2 changes: 1 addition & 1 deletion packages/perseus-cli/src/snoop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub fn snoop_wasm_build(dir: PathBuf) -> Result<i32, ExecutionError> {
let target = dir.join(".perseus");
run_cmd_directly(
format!(
"{} build --target web",
"{} build --target web --dev",
env::var("PERSEUS_WASM_PACK_PATH").unwrap_or_else(|_| "wasm-pack".to_string())
),
&target,
Expand Down

0 comments on commit 55cc681

Please sign in to comment.