Skip to content

Lighthouse: Remove unused JavaScript #13682

Answered by patrickhulce
enricoschaaf asked this question in Help
Discussion options

You must be logged in to vote

Hey everyone Lighthouse maintainer here 👋

This is working as intended in Lighthouse. It is a new audit in 6.0 that highlights files that have a considerable amount of unused JavaScript. In that URL that's highlighted, about 70% of the main chunk is unused. You can explore each line in detail using the "Coverage" panel in DevTools.

screenshot of the coverage panel highlighting unused portions of the main chunk related to animations

It is somewhat inevitable that some subset of JavaScript will be unused when using someone's library. They will have built features that you simply don't need. It's not important to obsess over 100% usage as that will be virtually impossible, but when it's a ra…

Replies: 5 comments 16 replies

Comment options

You must be logged in to vote
1 reply
@enricoschaaf
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
15 replies
@jserrao
Comment options

@ryanwalters
Comment options

@JonCognioDigital
Comment options

@realestninja
Comment options

@SalahAdDin
Comment options

Answer selected by enricoschaaf

This comment was marked as spam.

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