Skip to content

Commit

Permalink
Fix futursolo#120 - don't compile in JsValue in proc_macro.
Browse files Browse the repository at this point in the history
  • Loading branch information
finnbear committed May 24, 2023
1 parent fbd788f commit 6553640
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/stylist-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ wasm-bindgen-test = "0.3.33"

[features]
parser = ["dep:nom"]
proc_macro = []
1 change: 1 addition & 0 deletions packages/stylist-core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub enum Error {
///
/// This is usually raised when the style element failed to mount.
#[error("Failed to Interact with Web API. Are you running in Browser?")]
#[cfg(not(feature = "proc_macro"))]
Web(Option<wasm_bindgen::JsValue>),

/// Failed to read styles from the StyleManager.
Expand Down
2 changes: 1 addition & 1 deletion packages/stylist-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ rust-version = "1.60"
proc-macro = true

[dependencies]
stylist-core = { path = "../stylist-core", version = "0.12", features = ["parser"] }
stylist-core = { path = "../stylist-core", version = "0.12", features = ["parser", "proc_macro"] }

litrs = "0.4.0"
proc-macro-error = "1.0.4"
Expand Down

0 comments on commit 6553640

Please sign in to comment.