diff --git a/packages/stylist-core/Cargo.toml b/packages/stylist-core/Cargo.toml index 19c801d..6f1a291 100644 --- a/packages/stylist-core/Cargo.toml +++ b/packages/stylist-core/Cargo.toml @@ -37,3 +37,4 @@ wasm-bindgen-test = "0.3.33" [features] parser = ["dep:nom"] +proc_macro = [] \ No newline at end of file diff --git a/packages/stylist-core/src/error.rs b/packages/stylist-core/src/error.rs index ff64393..296999d 100644 --- a/packages/stylist-core/src/error.rs +++ b/packages/stylist-core/src/error.rs @@ -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), /// Failed to read styles from the StyleManager. diff --git a/packages/stylist-macros/Cargo.toml b/packages/stylist-macros/Cargo.toml index db6e308..6e0c5a3 100644 --- a/packages/stylist-macros/Cargo.toml +++ b/packages/stylist-macros/Cargo.toml @@ -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"