aidenybai / aidenybai/react-grab

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

オープン
#417 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
7.6k
フォーク
340
平均マージ
5時間 12分
マージ済み PR(30日)
6

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。