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

generate "names" in source maps #2415

Merged
merged 1 commit into from
Jul 25, 2022
Merged

generate "names" in source maps #2415

merged 1 commit into from
Jul 25, 2022

Conversation

evanw
Copy link
Owner

@evanw evanw commented Jul 25, 2022

The source map specification includes an optional names field that can associate an identifier with a mapping entry. This can be used to record the original name for an identifier, which is useful if the identifier was renamed to something else in the generated code. When esbuild was originally written, this field wasn't widely used, but now there are some debuggers that make use of it to provide better debugging of minified code. With this release, esbuild now includes a names field in the source maps that it generates. To save space, the original name is only recorded when it's different from the final name.

Fixes #1296

@evanw evanw merged commit 7208846 into master Jul 25, 2022
@evanw evanw deleted the source-map-names branch July 25, 2022 01:38
evanw added a commit to esbuild/esbuild.github.io that referenced this pull request Dec 1, 2022
The esbuild performance regression appears to be mainly due to evanw/esbuild#2415 in v0.14.50 (emitting `names` in source maps).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for sourcemap names
1 participant