diff options
Diffstat (limited to 'core/examples')
-rw-r--r-- | core/examples/ts_module_loader.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/examples/ts_module_loader.rs b/core/examples/ts_module_loader.rs index 289b43dc9..c7097fc91 100644 --- a/core/examples/ts_module_loader.rs +++ b/core/examples/ts_module_loader.rs @@ -50,8 +50,8 @@ impl ModuleLoader for TypescriptModuleLoader { .to_file_path() .map_err(|_| anyhow!("Only file:// URLs are supported."))?; - let media_type = MediaType::from(&path); - let (module_type, should_transpile) = match MediaType::from(&path) { + let media_type = MediaType::from_path(&path); + let (module_type, should_transpile) = match MediaType::from_path(&path) { MediaType::JavaScript | MediaType::Mjs | MediaType::Cjs => { (ModuleType::JavaScript, false) } |