【前端开发】删除项目中没使用冗余的npm包教程
在公司中,我们大部分都是多人共同开发和长时间维护一个项目,但是有时候我们会发现有很多已经废弃的npm 包存在 package.json 中,我们想要删除,但是又不能盲目的删除?那么 depcheck 它来了。
如何使用呢 第一步 全局安装: npm install depcheck -g 第二步 项目更目录下执行 depcheck (这里拿我们自己的项目来做的测试),
执行之后,根据自己得到的结果人工删除即可
Unused dependencies * @xkeshi/vue-qrcode * any-promise * backpack-core * cookie-universal-nuxt * tls * to * vue-loader * vue-meta-info Unused devDependencies * @babel/cli * @babel/preset-es2015 * @babel/preset-react * @babel/preset-stage-0 * @babel/register * @nuxtjs/sentry * axios-mock-adapter * babel-eslint * babel-loader * babel-plugin-component * child_process * css-loader * element-theme * element-theme-chalk * es3-compatible-webpack-plugin * es3ify-loader * eslint-friendly-formatter * eslint-loader * eslint-plugin-html * express * fs * http-proxy-middleware * jsencrypt * lang * net * node-sass * post-loader * qs * sass-loader * vue-style-loader * webpack-cli Missing dependencies * vue-no-ssr: ./.nuxt/components/no-ssr.js * unfetch: ./.nuxt/client.js * consola: ./.nuxt/client.js * nuxt_plugin_route_338f5eda: ./.nuxt/index.js * nuxt_plugin_main_6a83762f: ./.nuxt/index.js * nuxt_plugin_http_6a8178fe: ./.nuxt/index.js * nuxt_plugin_qrcode_7ec40a18: ./.nuxt/index.js * nuxt_plugin_aliyunosssdkmin_02f21098: ./.nuxt/index.js * nuxt_plugin_aliyunuploadsdk131min_c379eff6: ./.nuxt/index.js * vue-router: ./.nuxt/router.js * node-fetch: ./.nuxt/server.js * vuex: ./.nuxt/store.js * ~: ./assets/more-editor/more-editor.js * resize-observer-polyfill: ./component/util/resizeEvent.js * co: ./pages/circle/component/dakaEditor/editor.vue
本文来自博客园,作者:JeckHui;
个人主页:前端实用站点推荐; 热榜资讯早读:热榜资讯-导航;
转载请注明原文链接:https://www.cnblogs.com/xiaohuizhang/p/16442229.html
分类:
工具操作
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了