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.16k stars 68 forks source link

获取不到absolutePath #150

Closed tututuanzinuomi closed 12 months ago

tututuanzinuomi commented 1 year ago

问题描述,用的umi3,且有[@babel/plugin-transform-react-jsx-source] image image 获取不到absolutePath,有遇到相同问题的吗,很疑惑不知道是哪的问题

zthxxx commented 1 year ago

react-dev-inspector 自己的 babel-plugin 是处理相对路径的,并且优先级更高, 因此把 react-dev-inspector 的 babel-plugin 去掉就会读默认绝对路径了。

另外问下相对路径用起来有问题么?

gikey commented 1 year ago

如果不使用 react-dev-inspector 的 babel plugin 节点中就不会添加相对路径了,有点不方便,能尽快解决下吗 @zthxxx

zthxxx commented 1 year ago

@gikey 你遇到的是什么问题,绝对路径用起来有区别吗?听你描述应该和这个 issue 本身是反的吧