mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
feat(repl): support npm packages (#16770)
Co-authored-by: David Sherret <dsherret@gmail.com>
This commit is contained in:
parent
5d9bb8b4b0
commit
435948e470
6 changed files with 201 additions and 10 deletions
|
@ -699,10 +699,10 @@ fn get_document_path(
|
|||
cache: &HttpCache,
|
||||
specifier: &ModuleSpecifier,
|
||||
) -> Option<PathBuf> {
|
||||
if specifier.scheme() == "file" {
|
||||
specifier_to_file_path(specifier).ok()
|
||||
} else {
|
||||
cache.get_cache_filename(specifier)
|
||||
match specifier.scheme() {
|
||||
"npm" | "node" => None,
|
||||
"file" => specifier_to_file_path(specifier).ok(),
|
||||
_ => cache.get_cache_filename(specifier),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue