fix hotreloading issues in the CLI
This commit is contained in:
37 files changed
+818
-805
No files matched your search
@@ -11,10 +11,10 @@ keywords = ["dom", "ui", "gui", "react"]
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
proc-macro2 = { version = "1.0.6", features = ["span-locations"] }
|
||||
quote = "1.0"
|
||||
syn = { version = "1.0.11", features = ["full", "extra-traits", "visit"] }
|
||||
owo-colors = { version = "3.5.0", features = ["supports-colors"] }
|
||||
proc-macro2 = { workspace = true, features = ["span-locations"] }
|
||||
quote = {workspace = true }
|
||||
syn = { workspace = true, features = ["full", "extra-traits", "visit"] }
|
||||
owo-colors = { workspace = true, features = ["supports-colors"] }
|
||||
|
||||
[dev-dependencies]
|
||||
indoc = "2.0.3"
|
||||
|
||||
@@ -77,8 +77,8 @@ fn is_component_fn(item_fn: &syn::ItemFn) -> bool {
|
||||
fn get_closure_hook_body(local: &syn::Local) -> Option<&syn::Expr> {
|
||||
if let Pat::Ident(ident) = &local.pat {
|
||||
if is_hook_ident(&ident.ident) {
|
||||
if let Some((_, expr)) = &local.init {
|
||||
if let syn::Expr::Closure(closure) = &**expr {
|
||||
if let Some(init) = &local.init {
|
||||
if let syn::Expr::Closure(closure) = init.expr.as_ref() {
|
||||
return Some(&closure.body);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user