Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Sep 23, 2024

Conversation

CPunisher
Copy link
Member

Description:

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

Related issue (if exists):

closes #9567

@CPunisher CPunisher requested review from a team as code owners September 22, 2024 08:21
Copy link

changeset-bot bot commented Sep 22, 2024

🦋 Changeset detected

Latest commit: e520c4b

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codspeed-hq bot commented Sep 22, 2024

CodSpeed Performance Report

Merging #9578 will improve performances by 5.72%

Comparing CPunisher:fix/sourcemap-nl-tpl (e520c4b) with main (185d6f5)

Summary

⚡ 1 improvements
✅ 177 untouched benchmarks

Benchmarks breakdown

Benchmark main CPunisher:fix/sourcemap-nl-tpl Change
es/full/codegen/es2015 291.2 µs 275.4 µs +5.72%

@kdy1 kdy1 changed the title fix(es/codegen): fix wrong sourcemap when there are new lines in tpl fix(es/codegen): Fix wrong sourcemap when there are new lines in tpl Sep 23, 2024
@kdy1 kdy1 added this to the Planned milestone Sep 23, 2024
@kdy1 kdy1 merged commit cf74382 into swc-project:main Sep 23, 2024
24 checks passed
@cjnoname
Copy link

@kdy1 Hey mate, when the new version with this fix will be released? It's quite a serious bug.

@kdy1 kdy1 modified the milestones: Planned, v1.7.28 Sep 24, 2024
@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Wrong source map generated for minifiy
3 participants