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

large-javascript-libraries rework proposal #12296

Closed
connorjclark opened this issue Mar 25, 2021 · 3 comments · Fixed by #12941
Closed

large-javascript-libraries rework proposal #12296

connorjclark opened this issue Mar 25, 2021 · 3 comments · Fixed by #12941
Assignees
Labels

Comments

@connorjclark
Copy link
Collaborator

connorjclark commented Mar 25, 2021

We moved large-javascript-libraries out of the default config after receiving some negative feedback from developers concerned about Google choosing winners based on an unclear criteria. I collected some potential action items to fix this audit incrementally, but instead here I want to propose an entirely different approach.

  • Keep as diagnostic audit (don't upgrade to an opportunity)
  • Require source maps so we know the actual size and can detect packages without js-library-detector
  • Show all packages larger than 200 kB (uncompressed)
  • Link to https://bundlephobia.com/result?p=
  • Change title to Evaluate if large libraries on this page are necessary or have smaller alternatives

EDIT: TIL https://packagephobia.com/result?p=lighthouse

@ljharb
Copy link

ljharb commented Mar 25, 2021

I find this to be much less objectionable than the original approach, so thanks for listening to feedback.

I find bundlephobia to encourage very biased inferences, as the "bundle size" impact of a package simply can't be known outside of the entire app in which it lives - for example, if a transitive dependency is large, but it's used by half of your app, the size really isn't a meaningful factor in making a decision - or, if you've configured your bundler settings to optimize away packages that you know your target platforms you don't need (eg, replacing a polyfill package with a known-present or known-shimmed native implementation), then the impact of adding a new package might become negligible.

@connorjclark
Copy link
Collaborator Author

We are considering not reintroducing this audit, and instead relying on the planned "Large Modules" view of the soon-to-release Treemap App. In the table view in that mode, we can possibly link to external sites for alternative suggestions.

@connorjclark
Copy link
Collaborator Author

Small update: we aren't even doing a "Large Modules" view in treemap app, since the size of the nodes itself does the same function...

Just need to remove old code to mark this closed.

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

Successfully merging a pull request may close this issue.

3 participants