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

feat: add the ability to ignore-list sources #243

Merged
merged 2 commits into from
Feb 22, 2023

Conversation

bmeurer
Copy link
Contributor

@bmeurer bmeurer commented Feb 20, 2023

This adds the ability to mark sources emitted into a source map as ignore-listed, which provides a hint that debuggers can utilize when dealing with these sources1.

The ignoreList option can be passed to a MagicString now, and will be considered when generating a source map for it. In addition that bit will also be considered when the MagicString is added as source to a Bundle (with the possibility to override the value via a parameter to addSource). The x_google_ignoreList field in the source map will only be emitted if at least one of its sources was explicitly marked with ignoreList: true. Otherwise - and primarily for backwards compatibility with the existing ecosystem - no x_google_ignoreList field is emitted.

Fixes #241

cc @victorporof

Footnotes

  1. https://developer.chrome.com/blog/devtools-better-angular-debugging

README.md Outdated Show resolved Hide resolved
index.d.ts Show resolved Hide resolved
This adds the ability to mark sources emitted into a source map as
ignore-listed, which provides a hint that debuggers can utilize when
dealing with these sources[^1].

The `ignoreList` option can be passed to a `MagicString` now, and will
be considered when generating a source map for it. In addition that bit
will also be considered when the `MagicString` is added as source to a
`Bundle` (with the possibility to override the value via a parameter to
`addSource`). The `x_google_ignoreList` field in the source map will
only be emitted if at least one of its sources was explicitly marked
with `ignoreList: true`. Otherwise - and primarily for backwards
compatibility with the existing ecosystem - no `x_google_ignoreList`
field is emitted.

Fixes Rich-Harris#241

[^1]: https://developer.chrome.com/blog/devtools-better-angular-debugging
@antfu antfu merged commit e238f04 into Rich-Harris:master Feb 22, 2023
@bmeurer bmeurer deleted the feat/ignoreList branch February 22, 2023 10:53
@bmeurer
Copy link
Contributor Author

bmeurer commented Feb 22, 2023

Thanks!

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.

Add support for x_google_ignoreList
2 participants