zthxxx / react-dev-inspector

jump to local IDE code directly from browser React component by just a simple click
https://react-dev-inspector.zthxxx.me
MIT License
1.12k stars 67 forks source link

貌似不支持 react server component #165

Open Bubbleinpit opened 2 months ago

Bubbleinpit commented 2 months ago

在 nextjs 13 中使用,将 <Inspector /> 作为 client component 引入根组件 layout.tsx。发现所有 client component 都可以正常识别并跳转,而 server component 将会被识别成最近父节点的 client component。

zthxxx commented 2 months ago

@Bubbleinpit 部分代码放到 https://stackblitz.com 上来给个复现环境?

Bubbleinpit commented 2 months ago

@zthxxx 在 stackblitz 上新建了一个 nextjs 项目引入,可以复现:https://stackblitz.com/edit/stackblitz-starters-ytcgzk?file=app%2Fpage.tsx

zthxxx commented 2 weeks ago

看起来是因为 Next.js 没有为 server-side component 生成 debugSource 到 hydrate 过程,看起来需要 Next.js 解决

Bubbleinpit commented 2 weeks ago

看起来无解了