Optimize Core Web Vitals – FCP and LCP: Remove not need dependencies

Optimize Core Web Vitals – FCP and LCP: Remove not need dependencies

Check if any dependencies use this package

For example, use yarn to check glob

yarn why glob

Output

This package is already used by another …


This content originally appeared on DEV Community and was authored by Jen C.

Optimize Core Web Vitals - FCP and LCP: Remove not need dependencies

Check if any dependencies use this package

For example, use yarn to check glob

yarn why glob

Output

Image description

This package is already used by another package

For example, when seeing

info Has been hoisted to "glob"
info Reasons this module exists
   - Specified in "dependencies"
   - Hoisted from "@next#eslint-plugin-next#glob"
info Disk size without dependencies: "68KB"
info Disk size with unique dependencies: "208KB"
info Disk size with transitive dependencies: "300KB"
info Number of shared dependencies: 8
...

The package is not used by other packages

For example, when seeing

=> Found "negotiator@0.6.2"
info Has been hoisted to "negotiator"
info This module exists because it's specified in "dependencies".
info Disk size without dependencies: "48KB"
info Disk size with unique dependencies: "48KB"
info Disk size with transitive dependencies: "48KB"
info Number of shared dependencies: 0

Run yarn list --pattern <pattern> to filter the dependency list by pattern flag.

yarn list --pattern negotiator

We can then remove the unused packages.


This content originally appeared on DEV Community and was authored by Jen C.


Print Share Comment Cite Upload Translate Updates
APA

Jen C. | Sciencx (2025-03-27T07:09:11+00:00) Optimize Core Web Vitals – FCP and LCP: Remove not need dependencies. Retrieved from https://www.scien.cx/2025/03/27/optimize-core-web-vitals-fcp-and-lcp-remove-not-need-dependencies/

MLA
" » Optimize Core Web Vitals – FCP and LCP: Remove not need dependencies." Jen C. | Sciencx - Thursday March 27, 2025, https://www.scien.cx/2025/03/27/optimize-core-web-vitals-fcp-and-lcp-remove-not-need-dependencies/
HARVARD
Jen C. | Sciencx Thursday March 27, 2025 » Optimize Core Web Vitals – FCP and LCP: Remove not need dependencies., viewed ,<https://www.scien.cx/2025/03/27/optimize-core-web-vitals-fcp-and-lcp-remove-not-need-dependencies/>
VANCOUVER
Jen C. | Sciencx - » Optimize Core Web Vitals – FCP and LCP: Remove not need dependencies. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/03/27/optimize-core-web-vitals-fcp-and-lcp-remove-not-need-dependencies/
CHICAGO
" » Optimize Core Web Vitals – FCP and LCP: Remove not need dependencies." Jen C. | Sciencx - Accessed . https://www.scien.cx/2025/03/27/optimize-core-web-vitals-fcp-and-lcp-remove-not-need-dependencies/
IEEE
" » Optimize Core Web Vitals – FCP and LCP: Remove not need dependencies." Jen C. | Sciencx [Online]. Available: https://www.scien.cx/2025/03/27/optimize-core-web-vitals-fcp-and-lcp-remove-not-need-dependencies/. [Accessed: ]
rf:citation
» Optimize Core Web Vitals – FCP and LCP: Remove not need dependencies | Jen C. | Sciencx | https://www.scien.cx/2025/03/27/optimize-core-web-vitals-fcp-and-lcp-remove-not-need-dependencies/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.