facebook / react

The library for web and native user interfaces.
https://react.dev
MIT License
225.47k stars 45.97k forks source link

[DevTools Bug]: Version 5.2 shows incorrect source for all the components #29164

Open scirill opened 2 months ago

scirill commented 2 months ago

Website or app

https://github.com/codedthemes/mantis-free-react-admin-template/

Repro steps

  1. npm install
  2. npm run start

Point to any component in the page (for example the text "Hi, Welcome back 👋") , you will see the the source is wrong it points to the build tool output chunk file and not to the source of the file in the project. This is how it displays it now

image

This should point to the source in the project, the fileName should point to the file inside the src directory, as pointing to the output chunk is pointless for debug reasons. Thank you

How often does this bug happen?

Every time

DevTools package (automated)

No response

DevTools version (automated)

No response

Error message (automated)

No response

Error call stack (automated)

No response

Error component stack (automated)

No response

GitHub query string (automated)

No response

scirill commented 2 months ago

This is not a pure DevTools issue, this was done in #28351 that introduced this issue, following the change in #28265.

daniel-funnel commented 1 month ago

I just saw this issue appear, and it's incredibly frustrating. I noticed it's especially the issue with older version of React.