Vue找到package.json中没有用到依赖并删除

引言

一切都是由于强迫症,我想把一个Vue项目中没有用到的依赖删除掉。

解决方法 depcheck

Depcheck is a tool for analyzing the dependencies in a project to see: how each dependency is used, which dependencies are useless, and which dependencies are missing from .package.json
(Depcheck是一个用于分析项目中依赖项的工具,可以查看:每个依赖项是如何使用的,哪些依赖项是无用的,以及package.json中缺少哪些依赖项)

Installation

npm install -g depcheck

Or simply using npx which is a package runner bundled in :npm
(或者直接使用npx)

npx depcheck

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_52799373/article/details/131804705
今日推荐