npm 安装React Devtools调试工具

有时候没有科学上网工具时,怎么安装React DevTool, 其一直接搜索到Chrome的插件安装即可.

其二, 可以通过下载github上的react-devtools, 然后打包,最后导入chrome中, 具体如下:

1. $ git clone https://github.com/facebook/react-devtools.git

2. 进入react-devtools目录: $ npm --registry https://registry.npm.taobao.org install   ,这里使用淘宝镜像, 过程需要点时间,耐心等待。

3. 打包: npm run build:extension:chrome   

4. 生成目录:react-devtools -> shells -> chrome -> build -> unpacked

5 . 打开chrome浏览器的扩展程序 , 找到 load unpacked,导入第4步的目录即可.

猜你喜欢

转载自www.cnblogs.com/hughes5135/p/10199171.html