File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,9 @@ pub fn derive_props(input: TokenStream) -> TokenStream {
73
73
pub fn cfg_ssr ( _args : TokenStream , input : TokenStream ) -> TokenStream {
74
74
let input: proc_macro2:: TokenStream = input. into ( ) ;
75
75
quote ! {
76
- #[ cfg( any( not( target_arch = "wasm32" ) , sycamore_force_ssr) ) ]
77
- #input
76
+ :: sycamore:: web:: is_ssr! {
77
+ #input
78
+ }
78
79
}
79
80
. into ( )
80
81
}
@@ -97,8 +98,9 @@ pub fn cfg_ssr(_args: TokenStream, input: TokenStream) -> TokenStream {
97
98
pub fn cfg_not_ssr ( _args : TokenStream , input : TokenStream ) -> TokenStream {
98
99
let input: proc_macro2:: TokenStream = input. into ( ) ;
99
100
quote ! {
100
- #[ cfg( all( target_arch = "wasm32" , not( sycamore_force_ssr) ) ) ]
101
- #input
101
+ :: sycamore:: web:: is_not_ssr! {
102
+ #input
103
+ }
102
104
}
103
105
. into ( )
104
106
}
Original file line number Diff line number Diff line change @@ -69,7 +69,11 @@ pub use self::suspense::*;
69
69
pub use self :: view:: * ;
70
70
71
71
/// We add this to make the macros from `sycamore-macro` work properly.
72
+ /// We also add the `web` module so that the macros can access `::sycamore::web` correctly.
72
73
extern crate self as sycamore;
74
+ mod web {
75
+ pub use crate :: * ;
76
+ }
73
77
74
78
#[ doc( hidden) ]
75
79
pub mod rt {
You can’t perform that action at this time.
0 commit comments