一、去git上下載react-devtools文件到本地,https://github.com/facebook/react-devtools react
二、進入到react-devtools-master文件夾,用npm安裝依賴git
npm --registry https://registry.npm.taobao.org installgithub
三、安裝依賴成功後,打包一份擴展程序chrome
npm run build:extension:chrome shell
四、出現一下部分信息,索命打包成功npm
五、生成文件:,react-devtools -> shells -> chrome -> build -> unpacked文件夾瀏覽器
六、打開chrome擴展程序chrome://extensions/,加載已解壓的擴展程序,選擇第3步中的生成的unpacked文件夾。ui
七、這時就會添加一個新的擴展程序react-devtools,並在你的瀏覽器右上角會有個react標誌, 就表示成功啦。 blog