aidenybai / aidenybai/react-grab
Prefer React fiber _debugSource when owner stack resolves to generated/virtual source
- Dominant language
- TypeScript
- Stars
- 7.6k
- Forks
- 340
- Avg merge
- 5h 12m
- Merged PRs (30d)
- 6
Description
React Grab can display incorrect source locations in Webpack/Rspack projects when bippy/source owner stack frames resolve to generated or virtual module locations.
Observed behavior:
React fiber _debugSource points to the correct original source file and line
React Grab displays a different line from a generated eval/module source
The displayed location may correspond to webpack-internal://, webpack://, or another generated bundler URL
Current flow:
resolveSource(element) calls getStack(element)
getStack(element) uses getOwnerStack(fiber) from bippy/source
React Grab formats those stack frames
There is no direct _debugSource fallback/preference in resolveSource
Suggested fix:
Use React dev fiber _debugSource as a source candidate, and prefer it when the resolved stack source is missing or appears generated/virtual, especially in Webpack/Rspack projects.
---
I am currently working on a fix for my repo. As soon as i have something that works in my setup i will open a PR.
Contributor guide
Assessment
This issue has not been assessed yet.