Skip to content

Commit 6c6b879

Browse files
authored
Fix wasm builds (#9688)
This fixes broken WASM builds since #9682 and previously added sentry changes.
1 parent c299d7e commit 6c6b879

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

crates/node-bindings/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ dashmap = "5.4.0"
2323
xxhash-rust = { version = "0.8.2", features = ["xxh3"] }
2424
log = "0.4.21"
2525

26-
sentry = { version = "0.32.2", optional = true, default-features = false, features = ["backtrace", "contexts", "panic", "reqwest", "debug-images", "anyhow"]}
27-
once_cell = { version = "1.19.0", optional = true }
28-
whoami = { version = "1.5.1", optional = true }
29-
3026
glob = "0.3.1"
3127
serde = "1.0.198"
3228
serde_json = "1.0.116"
@@ -35,6 +31,10 @@ anyhow = "1.0.82"
3531
mockall = "0.12.1"
3632

3733
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
34+
sentry = { version = "0.32.2", optional = true, default-features = false, features = ["backtrace", "contexts", "panic", "reqwest", "debug-images", "anyhow"]}
35+
whoami = { version = "1.5.1", optional = true }
36+
once_cell = { version = "1.19.0", optional = true }
37+
3838
napi = { version = "2.16.4", features = ["serde-json", "napi4", "napi5"] }
3939
parcel-dev-dep-resolver = { path = "../../packages/utils/dev-dep-resolver" }
4040
parcel-macros = { path = "../macros", features = ["napi"] }

crates/parcel_filesystem/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ pub mod js_delegate_file_system;
1111
pub mod in_memory_file_system;
1212

1313
/// File-system implementation using std::fs and a canonicalize cache
14+
#[cfg(not(target_arch = "wasm32"))]
1415
pub mod os_file_system;
1516

1617
/// Trait abstracting file-system operations

crates/parcel_filesystem/src/os_file_system/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ use crate::FileSystem;
88

99
mod canonicalize;
1010

11-
#[cfg(not(target_arch = "wasm32"))]
1211
#[derive(Default)]
1312
pub struct OsFileSystem;
1413

15-
#[cfg(not(target_arch = "wasm32"))]
1614
impl FileSystem for OsFileSystem {
1715
fn cwd(&self) -> std::io::Result<PathBuf> {
1816
std::env::current_dir()

0 commit comments

Comments
 (0)