diff --git a/packages/liveview/src/lib.rs b/packages/liveview/src/lib.rs index 2bf4ea3bc..ff02febac 100644 --- a/packages/liveview/src/lib.rs +++ b/packages/liveview/src/lib.rs @@ -78,7 +78,13 @@ static INTERPRETER_JS: Lazy = Lazy::new(|| { } }"#; - interpreter.replace("/*POST_EVENT_SERIALIZATION*/", serialize_file_uploads) + let interpreter = interpreter.replace("/*POST_EVENT_SERIALIZATION*/", serialize_file_uploads); + interpreter.replace("import { setAttributeInner } from \"./common.js\";", "") +}); + +static COMMON_JS: Lazy = Lazy::new(|| { + let common = dioxus_interpreter_js::COMMON_JS; + common.replace("export", "") }); static MAIN_JS: &str = include_str!("./main.js"); @@ -89,11 +95,13 @@ static MAIN_JS: &str = include_str!("./main.js"); /// processing user events and returning edits to the liveview instance pub fn interpreter_glue(url: &str) -> String { let js = &*INTERPRETER_JS; + let common = &*COMMON_JS; format!( r#"