aidenybai / aidenybai/react-grab

Prefer React fiber _debugSource when owner stack resolves to generated/virtual source

Abierto
#417 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
7.6k
Forks
340
Merge medio
5 h 12 min
PR fusionados (30 d)
6

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.