fix liveview
This commit is contained in:
5 files changed
+22
-9
No files matched your search
@@ -9,6 +9,7 @@ pub use adapters::*;
|
||||
mod element;
|
||||
pub mod pool;
|
||||
mod query;
|
||||
use dioxus_interpreter_js::NATIVE_JS;
|
||||
use futures_util::{SinkExt, StreamExt};
|
||||
pub use pool::*;
|
||||
mod config;
|
||||
@@ -70,9 +71,17 @@ fn handle_edits_code() -> String {
|
||||
return;
|
||||
}
|
||||
}"#;
|
||||
let mut interpreter = SLEDGEHAMMER_JS
|
||||
.replace("/*POST_EVENT_SERIALIZATION*/", serialize_file_uploads)
|
||||
.replace("export", "");
|
||||
let mut interpreter = format!(
|
||||
r#"
|
||||
// Bring the sledgehammer code
|
||||
{SLEDGEHAMMER_JS}
|
||||
|
||||
// And then extend it with our native bindings
|
||||
{NATIVE_JS}
|
||||
"#
|
||||
)
|
||||
.replace("/*POST_EVENT_SERIALIZATION*/", serialize_file_uploads)
|
||||
.replace("export", "");
|
||||
while let Some(import_start) = interpreter.find("import") {
|
||||
let import_end = interpreter[import_start..]
|
||||
.find(|c| c == ';' || c == '\n')
|
||||
|
||||
Reference in new issue
Block a user