From 4f9ab8151dad9984c81c72eb10c2afe5313a7591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Wed, 3 Apr 2024 11:33:25 +0900 Subject: [PATCH] fix(common): Fix source index for `inputSourceMap` (#8800) **Related issue:** - Closes #8789 --- crates/swc_common/src/source_map.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/swc_common/src/source_map.rs b/crates/swc_common/src/source_map.rs index beccf76aca52..d1a951dfae9b 100644 --- a/crates/swc_common/src/source_map.rs +++ b/crates/swc_common/src/source_map.rs @@ -1225,7 +1225,7 @@ impl SourceMap { if let Some(orig) = orig { for src in orig.sources() { let id = builder.add_source(src); - src_id = id + 1; + src_id = id; builder.set_source_contents(id, orig.get_source_contents(id)); }