fix: tailwind.css use absolute path (#1649)

This commit is contained in:
HJin.me 2023-11-20 01:22:54 +08:00 committed by GitHub
parent 098689083d
commit ff6c7efb41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -469,7 +469,7 @@ pub fn gen_page(config: &DioxusConfig, serve: bool) -> String {
.unwrap_or_default() .unwrap_or_default()
.contains_key("tailwindcss") .contains_key("tailwindcss")
{ {
style_str.push_str("<link rel=\"stylesheet\" href=\"tailwind.css\">\n"); style_str.push_str("<link rel=\"stylesheet\" href=\"/{base_path}/tailwind.css\">\n");
} }
replace_or_insert_before("{style_include}", &style_str, "</head", &mut html); replace_or_insert_before("{style_include}", &style_str, "</head", &mut html);