mirror of
https://github.com/zaphar/Heracles.git
synced 2025-07-23 12:39:50 -04:00
refactor: use javascript module name ending
This commit is contained in:
parent
03820d2941
commit
c12c7c2477
@ -262,7 +262,7 @@ pub fn mk_ui_routes(config: Arc<Vec<Dashboard>>) -> Router<Config> {
|
||||
fn graph_lib_prelude() -> Markup {
|
||||
html! {
|
||||
script src="/js/plotly.js" { }
|
||||
script type="module" defer src="/js/lib.js" { }
|
||||
script type="module" defer src="/js/lib.mjs" { }
|
||||
link rel="stylesheet" href="/static/site.css" { }
|
||||
}
|
||||
}
|
||||
@ -370,13 +370,13 @@ pub async fn plotly() -> Response<String> {
|
||||
}
|
||||
|
||||
pub async fn lib() -> Response<String> {
|
||||
javascript_response(include_str!("../static/lib.js"))
|
||||
javascript_response(include_str!("../static/lib.mjs"))
|
||||
}
|
||||
|
||||
pub fn mk_js_routes(config: Arc<Vec<Dashboard>>) -> Router<Config> {
|
||||
Router::new()
|
||||
.route("/plotly.js", get(plotly))
|
||||
.route("/lib.js", get(lib))
|
||||
.route("/lib.mjs", get(lib))
|
||||
.route("/htmx.js", get(htmx))
|
||||
.with_state(State(config))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user