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(x_google_ignoreList): initial support for ignore lists #240

Merged
merged 1 commit into from
Feb 11, 2023

Conversation

bmeurer
Copy link
Contributor

@bmeurer bmeurer commented Feb 4, 2023

This patch introduces support for the x_google_ignoreList field to the SourceMap class. This extension was added to the Source Map Revision 3 Proposal1 to allow build tools to provide hints to debuggers (e.g. browser DevTools) about which files contain library or framework, and should thus be ignored by default for the purpose of stepping, break on exceptions, and the like2.

With this change it's possible for consumers of magic-string's SourceMap class to thread through and serialize the newly added x_google_ignoreList field (for example this is needed for rollup to support x_google_ignoreList).

In a follow up change, we will also add support to the Bundle class to mark certain sources as ignore listed.

Ref: #241

Footnotes

  1. https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k

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

This patch introduces support for the `x_google_ignoreList` field
to the `SourceMap` class. This extension was added to the Source Map
Revision 3 Proposal[^1] to allow build tools to provide hints to
debuggers (e.g. browser DevTools) about which files contain library
or framework, and should thus be ignored by default for the purpose
of stepping, break on exceptions, and the like[^2].

With this change it's possible for consumers of magic-string's
`SourceMap` class to thread through and serialize the newly added
`x_google_ignoreList` field (for example this is needed for rollup
to support `x_google_ignoreList`).

In a follow up change, we will also add support to the `Bundle`
class to mark certain sources as ignore listed.

[^1]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k
[^2]: https://developer.chrome.com/blog/devtools-better-angular-debugging/
@bmeurer
Copy link
Contributor Author

bmeurer commented Feb 4, 2023

For more context: This is part of the changes we are planning to make to improve the interoperability between Vite and Chrome DevTools.

@bmeurer
Copy link
Contributor Author

bmeurer commented Feb 9, 2023

@antfu could you include this in the next release please?

@Rich-Harris Rich-Harris merged commit 209c42d into Rich-Harris:master Feb 11, 2023
@Rich-Harris
Copy link
Owner

released as 0.29. 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.

None yet

2 participants