summaryrefslogtreecommitdiff
path: root/cli/tsc.rs
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2020-09-09 13:23:57 +0100
committerGitHub <noreply@github.com>2020-09-09 14:23:57 +0200
commitb17a5fbcfaaeb70f8876ce4ca09fdcc61f7e825c (patch)
treeb59175137a0c7db162895feb6fe35213ab326b20 /cli/tsc.rs
parentc14436a424449d845a769a70ca7bc3d313201482 (diff)
fix(op_crates/web): Use "deno:" URLs for internal script specifiers (#7383)
Diffstat (limited to 'cli/tsc.rs')
-rw-r--r--cli/tsc.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/cli/tsc.rs b/cli/tsc.rs
index ae2db6978..90a1a31b5 100644
--- a/cli/tsc.rs
+++ b/cli/tsc.rs
@@ -1103,6 +1103,9 @@ impl TsCompiler {
script_name: &str,
) -> Option<Vec<u8>> {
if let Some(module_specifier) = self.try_to_resolve(script_name) {
+ if module_specifier.as_url().scheme() == "deno" {
+ return None;
+ }
return match self.get_source_map_file(&module_specifier) {
Ok(out) => Some(out.source_code.into_bytes()),
Err(_) => {
@@ -1848,11 +1851,11 @@ mod tests {
(r#"{ "compilerOptions": { "checkJs": true } } "#, true),
// JSON with comment
(
- r#"{
- "compilerOptions": {
- // force .js file compilation by Deno
- "checkJs": true
- }
+ r#"{
+ "compilerOptions": {
+ // force .js file compilation by Deno
+ "checkJs": true
+ }
}"#,
true,
),