-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] Show component file path in Elements panel / 支持在 elements 面板显示组件文件路径 #166
Comments
@tjx666 https://react-dev-inspector.zthxxx.me/docs/compiler-plugin#react-dev-inspectorbabel-plugin 效果如: // Input
<div />
// Output
<div data-inspector-relative-path="src/path/Component.tsx" data-inspector-line="10" data-inspector-column="6" /> |
Get, 明白你说的问题点呢~ 近期目标是提供一个右键菜单以支持选择父级各个组件。 |
|
@tjx666 报错信息和截图似乎没有关联,发下完整配置信息和完整报错栈呢 examples/nextjs-custom-server 是能正常启动的 https://github.com/zthxxx/react-dev-inspector/blob/dev/examples/nextjs-custom-server/server.mjs |
|
@tjx666 workaround:
import dynamic from 'next/dynamic';
import type { AppProps } from 'next/app';
const Inspector = dynamic(
() => import('react-dev-inspector').then(({ Inspector }) => Inspector),
{ ssr: false }
);
export default function App({ Component, pageProps }: AppProps) {
return (
<>
<Inspector />
<Component {...pageProps} />
</>
);
} |
描述
像 https://github.com/webfansplz/vite-plugin-vue-inspector 一样:
使用场景
有时候两个组件在网页上非常接近不好选中,如果可以直接在 elements 面板中清除的看到某个元素对应哪个文件就好了
The text was updated successfully, but these errors were encountered: