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标志, 就表示成功啦。

猜你喜欢

转载自www.cnblogs.com/lyt598/p/12463270.html