swc/.changeset/gentle-cycles-repair.md
CPunisher cf74382ba0
fix(es/codegen): Fix wrong sourcemap when there are new lines in tpl (#9578)
**Description:**

1. split quasi by '\n' 
2. add the mapping between the original string and the generated string one by one.

<img width="873" alt="image"
src="https://github.com/user-attachments/assets/8a03da7f-2d22-4dd5-9bac-220418b10911">

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/9567
2024-09-23 11:02:24 +09:00

118 B

swc_ecma_codegen swc_core
patch patch

fix(es/codegen): fix wrong sourcemap when there are new lines in tpl