react-devtools安装

进入到react-devtools-master文件夹,用npm安装依赖

npm --registry https://registry.npm.taobao.org install

安装依赖成功后,我们便可以打包一份扩展程序出来

npm run build:extension:chrome

项目目录中生成一个新的文件夹,react-devtools -> shells -> chrome -> build -> unpacked文件夹
打开chrome扩展程序chrome://extensions/,加载已解压的扩展程序,选择第3步中的生成的unpacked文件夹。这时就会添加一个新的扩展程序react-devtools,并在你的浏览器右上角会有个react标志, 就表示成功啦。


https://www.jianshu.com/p/8afd06135fd5
posted @ 2020-03-11 16:34  lyt598  阅读(467)  评论(0编辑  收藏  举报