some basic viewer

This commit is contained in:
Robin Appelman 2023-04-29 14:54:53 +02:00
commit 5910b2f35a
45 changed files with 1089 additions and 1436 deletions

File diff suppressed because it is too large Load diff

View file

@ -20,7 +20,7 @@ swc_ecma_transforms_base = { version = "0.126.10" }
swc_ecma_transforms_typescript = { version = "0.176.12" }
swc_ecma_visit = { version = "0.89.4" }
anyhow = "1.0.70"
jsx-dom-expressions = { version = "0.1", git = "https://github.com/icewind1991/swc-plugin-jsx-dom-expressions", branch = "event" }
jsx-dom-expressions = { version = "0.1", git = "https://github.com/icewind1991/swc-plugin-jsx-dom-expressions", branch = "mixed-svg" }
#jsx-dom-expressions = { version = "0.1", path = "../../../../rust/swc-plugin-jsx-dom-expressions" }
rand = "0.8.5"
fnv = "1.0.7"

View file

@ -32,7 +32,13 @@ pub fn guess_mime(path: &str) -> &'static str {
return "image/png";
} else if path.ends_with("css") {
return "text/css";
} else if path.ends_with("js") {
} else if path.ends_with("wasm") {
return "application/wasm";
} else if path.ends_with("js")
|| path.ends_with("ts")
|| path.ends_with("jsx")
|| path.ends_with("tsx")
{
return "text/javascript";
}
return "text/plain";