Browse Source

fix(core): mime type of .less, .sass and .styl files (#6316)

Lucas Fernandes Nogueira 2 years ago
parent
commit
5fdf8dcb8e
2 changed files with 6 additions and 1 deletions
  1. 5 0
      .changes/css-preprocessor-mime-type.md
  2. 1 1
      core/tauri-utils/src/mime_type.rs

+ 5 - 0
.changes/css-preprocessor-mime-type.md

@@ -0,0 +1,5 @@
+---
+"tauri-utils": patch
+---
+
+Correctly determine mime type of `.less`, `.sass` and `.styl` files.

+ 1 - 1
core/tauri-utils/src/mime_type.rs

@@ -49,7 +49,7 @@ impl MimeType {
     let suffix = uri.split('.').last();
     match suffix {
       Some("bin") => Self::OctetStream,
-      Some("css") => Self::Css,
+      Some("css" | "less" | "sass" | "styl") => Self::Css,
       Some("csv") => Self::Csv,
       Some("html") => Self::Html,
       Some("ico") => Self::Ico,