Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused dependencies #742

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Surafel-Getachew
Copy link
Contributor

@Surafel-Getachew Surafel-Getachew commented Jun 16, 2023

This branch is intended to research on unused npm dependencies and remove them from package.json and package-lock.json

@vercel
Copy link

vercel bot commented Jun 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
consulting ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 16, 2023 9:20pm
labs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 16, 2023 9:20pm

@Surafel-Getachew
Copy link
Contributor Author

Approach used to search for unused dependencies:

  • Use npx depcheck to list out potential unused dependencies.
  • check on the library how it could be used, imported and search all the files in the project for that can kind of use.
  • Check git history of that line to get context of when it's added, files that are changed during that commit, file that imported that package.
  • If we get a use case that can be used leave it as is, else uninstall the package this will remove it from package.json and package-lock.json.
  • Run the app both consulting and labs and check if it cause's any error while running the app.
  • Build the app and check if there's any error in the build process.

Packages that are affected/removed by this commit

  • core-js
  • regenerator-runtime
  • slick-carousel
  • swr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant