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

Add support for x_google_ignoreList #241

Closed
bmeurer opened this issue Feb 8, 2023 · 2 comments · Fixed by #243
Closed

Add support for x_google_ignoreList #241

bmeurer opened this issue Feb 8, 2023 · 2 comments · Fixed by #243

Comments

@bmeurer
Copy link
Contributor

bmeurer commented Feb 8, 2023

magic-string is used throughout various parts of the JavaScript ecosystem that deal with generating and manipulating source maps. Having basic support for the new x_google_ignoreList source map extension12 will make it easy and natural for tools to mark library / framework code as ignore-listed (for debuggers).

Doc: https://goo.gle/devtools-ignoreList-adoption

Footnotes

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

  2. https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.mt2g20loc2ct

@antfu
Copy link
Collaborator

antfu commented Feb 17, 2023

Close as it's shipped 🎉

@antfu antfu closed this as completed Feb 17, 2023
@bmeurer
Copy link
Contributor Author

bmeurer commented Feb 17, 2023

Only the initial support landed. As proposed in the doc, for easier adoption, a second follow up PR should land (which I'm preparing) to add support for marking sources as ignore listed when adding to bundles.

@antfu antfu reopened this Feb 18, 2023
bmeurer added a commit to bmeurer/magic-string that referenced this issue 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 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
bmeurer added a commit to bmeurer/magic-string that referenced this issue 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 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
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 a pull request may close this issue.

2 participants