mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 04:39:10 +00:00
fix(op_crates/web): Use "deno:" URLs for internal script specifiers (#7383)
This commit is contained in:
parent
c14436a424
commit
b17a5fbcfa
10 changed files with 73 additions and 29 deletions
13
cli/tsc.rs
13
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,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue