diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-10-26 07:17:58 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 07:17:58 +1100 |
commit | 3d19fb493b82a8ab9b3fd0fa923fc81fd68acb4e (patch) | |
tree | 8080a1f05c43c972db1a0ecbc0a39ed74c78f419 /cli/module_graph2.rs | |
parent | 95854b88ad4a67afb885322c70bb424352bca49e (diff) |
fix(cli): properly handle roots with extensions that don't match media type (#8114)
Diffstat (limited to 'cli/module_graph2.rs')
-rw-r--r-- | cli/module_graph2.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cli/module_graph2.rs b/cli/module_graph2.rs index 05bd40783..8ee60eb59 100644 --- a/cli/module_graph2.rs +++ b/cli/module_graph2.rs @@ -758,8 +758,11 @@ impl Graph2 { info!("{} {}", colors::green("Check"), specifier); } - let root_names: Vec<String> = - self.roots.iter().map(|ms| ms.to_string()).collect(); + let root_names: Vec<(ModuleSpecifier, MediaType)> = self + .roots + .iter() + .map(|ms| (ms.clone(), self.get_media_type(ms).unwrap())) + .collect(); let maybe_tsbuildinfo = self.maybe_tsbuildinfo.clone(); let hash_data = vec![config.as_bytes(), version::DENO.as_bytes().to_owned()]; |