vue-devtools 是开发调试vue 的一款chrome浏览器插件,使用非常方便。
安装方式:
1、git clone 下载
git clone https://github.com/vuejs/vue-devtools.git
2、npm 安装依赖
下载完成后,cd到下载好的目录,执行安装依赖。(比较耗时,耐心等待)
npm install
3、编译
npm run build
编译的我这边遇到一个错误:
20 error code ELIFECYCLE
21 error errno 1
22 error vue-devtools@5.3.3 build: `cd packages/shell-chrome && cross-env NODE_ENV=production webpack --progress --hide-modules`
22 error Exit status 1
23 error Failed at the vue-devtools@5.3.3 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
解决方法:
rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install
npm run build
4、添加chrome插件
打开谷歌浏览器,输入 chrome://extensions/ ,选择开发者模式,加载已解压的扩展程序,导入即可。