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

create-react-app 5.0.0 无法唤起 vscode #117

Closed cp3hnu closed 2 years ago

cp3hnu commented 2 years ago

您好,我按照 https://github.com/zthxxx/react-dev-inspector#usage-with-create-react-apphttps://github.com/zthxxx/react-dev-inspector#vscode 里面的配置, 配置好我的项目(用 create-react-app 建的 demo 项目),其它的都没有问题,就是点击的时候无法唤起 vscode 我打开控制台也看到发出请求了 http://localhost:3000/__open-stack-frame-in-editor/relative?fileName=src%2FHelloWord.js&lineNumber=5&colNumber=6 命令行输入 code 也能打开 vscode 请问还有哪里没有配置好?

zthxxx commented 2 years ago

我把 demo 升级到 cra 5.0 排查下,盲猜是 webpack 5 的适配问题

zthxxx commented 2 years ago

@cp3hnu 请问能提供 GitHub 仓库么,看看你的配置

cp3hnu commented 2 years ago

@zthxxx 对不起,没注意到您的回复,下面是我的 GitHub 仓库: https://github.com/cp3hnu/create-react-app

node: v16.14.2 npm: 8.5.0

非常感谢您的帮助

zthxxx commented 2 years ago

@cp3hnu create-react-app@5 版本相关的配置写法有变动,README 里面已经更新了 → #usage-with-create-react-app

对应这一部分

image
cp3hnu commented 2 years ago

可以了,非常感谢