1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -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 GitHub
parent 0eb5be9a12
commit a09296322e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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) {