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

perf(esbuild): disable sourcesContent #390

Merged
merged 2 commits into from
Nov 22, 2023
Merged

Conversation

privatenumber
Copy link
Owner

@privatenumber privatenumber commented Nov 15, 2023

This disables sourcesContent in esbuild:

The sourcesContent field is an optional field that contains all of the original source code. This is helpful for debugging because it means the original source code will be available in the debugger.

However, it's not needed in some scenarios. For example, if you are just using source maps in production to generate stack traces that contain the original file name, you don't need the original source code because there is no debugger involved. In that case it can be desirable to omit the sourcesContent field to make the source map smaller:

This doesn't impact the tests because it only checks the error stack. But I think it might make sense to investigate how this impacts the debugger first in different environments, and investigate whether there's a way to detect whether the debugger is enabled.

@privatenumber privatenumber changed the title perf(esbuild): disable sourcesContent perf(esbuild): disable sourcesContent Nov 15, 2023
@privatenumber privatenumber marked this pull request as ready for review November 22, 2023 14:41
@privatenumber privatenumber merged commit 0b624b3 into develop Nov 22, 2023
2 checks passed
@privatenumber privatenumber deleted the esbuild-sources-content branch November 22, 2023 14:48
@privatenumber
Copy link
Owner Author

🎉 This issue has been resolved in v4.3.0

If you appreciate this project, please consider supporting this project by sponsoring ❤️ 🙏

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant