1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-28 16:20:57 -05:00

chore(core): improve error message in module loader example (#17654)

Just a small tweak to the error message to avoid confusion.
This commit is contained in:
Waldir Pimenta 2023-02-05 07:45:58 +00:00 committed by Bartek Iwańczuk
parent 7d46a660fa
commit 971a494bd7
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750

View file

@ -47,7 +47,7 @@ impl ModuleLoader for TypescriptModuleLoader {
async move {
let path = module_specifier
.to_file_path()
.map_err(|_| anyhow!("Only file: URLs are supported."))?;
.map_err(|_| anyhow!("Only file:// URLs are supported."))?;
let media_type = MediaType::from(&path);
let (module_type, should_transpile) = match MediaType::from(&path) {