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

Feature Request: remove line and character position data from sourcemap #4035

Open
pjebs opened this issue Jan 12, 2025 · 1 comment
Open

Comments

@pjebs
Copy link

pjebs commented Jan 12, 2025

Source maps are very large.
I only need the original filename (and original file path) for debugging stack traces.

There is an option to remove the sourceContent: https://esbuild.github.io/api/#sources-content

{
  "version": 3,
  "sources": ["bar.js", "foo.js"],
  "sourcesContent": ["bar()", "foo()\nimport './bar'"],
  "mappings": ";AAAA;;;ACAA;",
  "names": []
}

A good feature is to limit the mappings data to just the original filename and original filepath WITH no line number and character information (Or map everything to line 0 character 0 of a given source file)

@pjebs
Copy link
Author

pjebs commented Jan 12, 2025

More information: https://tc39.es/ecma426/#mappings-structure

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

No branches or pull requests

1 participant