You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there some way to make this work with Actix? I have the following but the server cannot see the image optimizer, Im assuming this is because leptos_router..._context doesnt not accept primatives.
HttpServer::new(move || {let leptos_options = &conf.leptos_options;let site_root = &leptos_options.site_root;let optimizer = ImageOptimizer::new("/__cache/image", site_root.clone(),1);let state = AppState{leptos_options: leptos_options.clone(),optimizer: optimizer.clone(),};App::new().service(css).route("/api/*fn_name", leptos_actix::handle_server_fns())// serve JS/WASM/CSS from `pkg`.service(Files::new("/pkg",format!("{site_root}/pkg")))// serve other assets from the `assets` directory.service(Files::new("/public", site_root))// serve the favicon from /favicon.ico.service(favicon).leptos_routes(leptos_options.to_owned(), routes.to_owned(),App).leptos_routes_with_context(
leptos_options.clone(),generate_route_list(App),
optimizer.provide_context(),App,).app_data(web::Data::new(state.to_owned()))//.wrap(middleware::Compress::default())}).bind(&addr)?
.run().await
The text was updated successfully, but these errors were encountered:
Is there some way to make this work with Actix? I have the following but the server cannot see the image optimizer, Im assuming this is because leptos_router..._context doesnt not accept primatives.
The text was updated successfully, but these errors were encountered: