Skip to content

Commit

Permalink
DevTools: Named hooks supports "cheap-module-source-map" (#21874)
Browse files Browse the repository at this point in the history
"cheap-module-source-map" is the default source-map generation mode used in created-react-dev mode because of speed. The major trade-off is that the source maps generated don't contain column numbers, so DevTools needs to be more lenient when matching AST nodes in this mode.

In this case, it can ignore column numbers and match nodes using line numbers only– so long as only a single node matches. If more than one match is found, treat it the same as if none were found, and fall back to no name.
  • Loading branch information
Brian Vaughn authored Jul 14, 2021
1 parent a97b5ac commit 87b3ada
Show file tree
Hide file tree
Showing 15 changed files with 498 additions and 28 deletions.
1 change: 1 addition & 0 deletions packages/react-devtools-extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"rollup-plugin-commonjs": "^9.3.4",
"rollup-plugin-node-resolve": "^2.1.1",
"source-map": "^0.8.0-beta.0",
"sourcemap-codec": "^1.4.8",
"style-loader": "^0.23.1",
"web-ext": "^3.0.0",
"webpack": "^4.43.0",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 87b3ada

Please sign in to comment.