Open HosseinAgha opened 11 months ago
Same problem.
I am using https://github.com/zthxxx/react-dev-inspector, which depends on __debugSource
to obtain the component file path in development environment. Now, the lack of __debugSource
in app router causes this function to be unavailable.
Does anyone figure out why this happened? I've tested in PageRoute mode, it's ok. But in AppRoute, Not Working, no matter 'use client' or not.
I think a solution would be creating a SWC Plugin https://nextjs.org/docs/architecture/nextjs-compiler#swc-plugins-experimental that adds __debugSource
and __debugOwner
@scplay because approute uses RSC by default
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/suspicious-euclid-qq4zfy
To Reproduce
Run the repro sandbox and check the console. I log the React Fiber instance for both components and the value of the
__debugSource
is null for Server Component.Current vs. Expected behavior
The server component fiber nodes does not contain the
__debugSource
and__debugOwner
information while the client only components do. All components that get rendered should have the debugging information during development.Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
App Router
Additional context
This bug impacts tools that rely on
__debugSource
in development. Please check https://github.com/ericclemmons/click-to-component/issues/78