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 #4847

Open
bmeurer opened this issue Feb 8, 2023 · 3 comments
Open

Add support for x_google_ignoreList #4847

bmeurer opened this issue Feb 8, 2023 · 3 comments

Comments

@bmeurer
Copy link
Contributor

bmeurer commented Feb 8, 2023

Feature Use Case

Chrome DevTools introduced1 support for a new x_google_ignoreList source map extension2 last year, which allows to libraries / frameworks to have their code automatically ignore-listed in the debugger, meaning that files will not show up or if shown will be grayed out, stepping and breaking on exceptions will ignore these files by default, etc.

Feature Proposal

We propose1 two sets of changes in rollup to leverage the ignore-listing effectively.

  1. Introduce a sourcemapIgnoreList predicate similar to the sourcemapPathTransform callback. The sourcemapIgnoreList predicate (when provided) will be called with the same inputs as the sourcemapPathTransform callback and if the result is true, the corresponding sources entry in the source map will be added to the x_google_ignoreList. The sourcemapIgnoreList predicate (when provided) will always be called before the sourcemapPathTransform callback.
  2. Preserve (and repopulate) x_google_ignoreList annotations from input source maps and other transforms.

Ref: Rich-Harris/magic-string#241

Footnotes

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

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

@0xdevalias
Copy link

@bmeurer
Copy link
Contributor Author

bmeurer commented Dec 3, 2023

@bmeurer I believe this is already implemented now, right?

No, rollup doesn't propagate x_google_ignoreList from input source maps yet. Also it needs to be updated to support ignoreList.

@0xdevalias
Copy link

0xdevalias commented Dec 4, 2023

No, rollup doesn't propagate x_google_ignoreList from input source maps yet. Also it needs to be updated to support ignoreList.

@bmeurer Ah true, that makes sense. Thanks.


Further details on the change from x_google_ignoreList to ignoreList here:

Originally posted by @0xdevalias in facebook/react#27774 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants