Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force console panic logging by default #1200

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ login:
wasm-pack login --scope=@mutinywallet

dev:
wasm-pack build ./mutiny-wasm --weak-refs --target web --scope mutinywallet -- --features console_error_panic_hook
wasm-pack build ./mutiny-wasm --weak-refs --target web --scope mutinywallet

release:
wasm-pack build ./mutiny-wasm --release --weak-refs --target web --scope mutinywallet
Expand Down
4 changes: 2 additions & 2 deletions mutiny-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ bitcoin-waila = "0.5.0"
# The `console_error_panic_hook` crate provides better debugging of panics by
# logging them with `console.error`. This is great for development, but requires
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
# code size when deploying.
console_error_panic_hook = { version = "0.1.7", optional = true }
# code size when deploying. Alas, we do it anyways.
console_error_panic_hook = { version = "0.1.7" }

[dev-dependencies]
wasm-bindgen-test = "0.3.33"
Expand Down
1 change: 0 additions & 1 deletion mutiny-wasm/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ pub fn set_panic_hook() {
//
// For more details see
// https://github.com/rustwasm/console_error_panic_hook#readme
#[cfg(feature = "console_error_panic_hook")]
console_error_panic_hook::set_once();
}

Expand Down
Loading