🚧 Incopora recursos estáticos con "use_static!()"
This commit is contained in:
parent
32d068065e
commit
bcf403ab50
10 changed files with 35 additions and 21 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue