🚧 Incopora recursos estáticos con "use_static!()"

This commit is contained in:
Manuel Cillero 2023-06-23 12:31:43 +02:00
parent 32d068065e
commit bcf403ab50
10 changed files with 35 additions and 21 deletions

View file

@ -2,7 +2,7 @@ use pagetop::prelude::*;
use_handle!(MODULE_JQUERY);
include!(concat!(env!("OUT_DIR"), "/jquery.rs"));
use_static!(jquery);
const JQUERY_PARAM: &str = "jquery.add";
const JQUERY_SOURCE: &str = "/jquery/3.6.0/jquery.min.js";
@ -15,7 +15,7 @@ impl ModuleTrait for JQuery {
}
fn configure_service(&self, cfg: &mut service::web::ServiceConfig) {
serve_static_files!(cfg, "/jquery", bundle_jquery);
serve_static_files!(cfg, "/jquery", jquery);
}
}