dillon1000/react

Commit

feat[devtools]: support x_google_ignoreList source maps extension (#26951)

## Summary
This was originally implemented by Mengdi @mondaychen in
https://github.com/facebook/react/pull/26506.

Because we patch console methods (to append components stack and some
other features), errors in console will include
`react_devtools_backend-....js` in its stack traces. Example:
<img width="763" alt="Screenshot 2023-06-15 at 13 31 49"
src="https://github.com/facebook/react/assets/28902667/fa9c3d26-b6c5-4965-af71-62d100cd806d">

Using https://github.com/mondaychen/devtools-ignore-webpack-plugin to
support [x_google_ignoreList source maps
extension](https://developer.chrome.com/blog/devtools-better-angular-debugging/#the-x_google_ignorelist-source-map-extension).

@mondaychen created a react app, which throws an error via
`console.error`, when user click on the button -
https://3owqsn.csb.app/.

Stack trace with these changes: 
<img width="759" alt="Screenshot 2023-06-14 at 14 26 38"
src="https://github.com/facebook/react/assets/28902667/b118b168-3200-4a47-9718-39fc455ea993">
Browse files
Changed paths6 files
First-parent comparison
M packages/react-devtools-extensions/package.json ModifiedA packages/react-devtools-extensions/src/__tests__/xGoogleIgnoreList-test.js AddedM packages/react-devtools-extensions/webpack.backend.js ModifiedM packages/react-devtools-shared/src/__tests__/utils.js ModifiedM scripts/jest/config.build-devtools.js ModifiedM yarn.lock Modified
Patch

Files changed

Rendering syntax-highlighted changes…