summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/shared.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/shared.rs b/runtime/shared.rs
index fc91be145..f9af2c7d4 100644
--- a/runtime/shared.rs
+++ b/runtime/shared.rs
@@ -97,8 +97,13 @@ pub fn maybe_transpile_source(
let transpiled_source = parsed.transpile(&deno_ast::EmitOptions {
imports_not_used_as_values: deno_ast::ImportsNotUsedAsValues::Remove,
inline_source_map: false,
+ source_map: cfg!(debug_assertions),
..Default::default()
})?;
- Ok((transpiled_source.text.into(), None))
+ let maybe_source_map: Option<SourceMapData> = transpiled_source
+ .source_map
+ .map(|sm| sm.into_bytes().into());
+
+ Ok((transpiled_source.text.into(), maybe_source_map))
}