diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2021-10-27 17:18:53 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-27 17:18:53 +1100 |
commit | b44b26c8842522e0e952c31aeb42c7fb85a5c7a7 (patch) | |
tree | 9a80196aed6b669c750311dc35b4b1f4db81fd6b /cli/emit.rs | |
parent | 1c739470b590ea13dc0aa67c0ecc7ea6f49b5746 (diff) |
fix(cli): no-check respects inlineSources compiler option (#12559)
Fixes #12064
Diffstat (limited to 'cli/emit.rs')
-rw-r--r-- | cli/emit.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/emit.rs b/cli/emit.rs index 7b25713fa..a4713f532 100644 --- a/cli/emit.rs +++ b/cli/emit.rs @@ -184,7 +184,6 @@ pub(crate) fn get_ts_config( "emitDecoratorMetadata": false, "importsNotUsedAsValues": "remove", "inlineSourceMap": true, - // TODO(@kitsonk) make this actually work when https://github.com/swc-project/swc/issues/2218 addressed. "inlineSources": true, "sourceMap": false, "jsx": "react", @@ -519,6 +518,9 @@ pub(crate) fn bundle( let globals = swc::common::Globals::new(); deno_ast::swc::common::GLOBALS.set(&globals, || { let emit_options: ast::EmitOptions = options.ts_config.into(); + let source_map_config = ast::SourceMapConfig { + inline_sources: emit_options.inline_sources, + }; let cm = Rc::new(swc::common::SourceMap::new( swc::common::FilePathMapping::empty(), @@ -577,7 +579,7 @@ pub(crate) fn bundle( let mut maybe_map: Option<String> = None; { let mut buf = Vec::new(); - cm.build_source_map_from(&mut srcmap, None) + cm.build_source_map_with_config(&mut srcmap, None, source_map_config) .to_writer(&mut buf)?; if emit_options.inline_source_map { let encoded_map = format!( |