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

Filter modules by chunk #44

Open
gerkensm opened this issue Jul 18, 2022 · 1 comment
Open

Filter modules by chunk #44

gerkensm opened this issue Jul 18, 2022 · 1 comment

Comments

@gerkensm
Copy link

gerkensm commented Jul 18, 2022

I've been searching for a tool like this for a while now, thank you for your hard work!
I'm currently trying to reduce the size of my initial webpack chunks - I have different lazy-loaded components in my application and it's fine if they load some larger libraries. However, some of these libraries somehow snuck into the main chunk, probably by some constant being imported in an innocuous-looking source file.
Now if I search for the library using whybundled stats.json some-huge-library, I get all source filenames that import this library. Is it possible to display the chunk name of the file next to it - or even filter by the chunk that hosts this module?

@gerkensm
Copy link
Author

gerkensm commented Jul 19, 2022

I started creating this myself - the basic functionality is already done thanks to this fork that I ported to the current version; Would you be interested in accepting a PR if I invested a bit more time and created a PR or is this out of scope for what you have in mind for this tool? If so, I'd try and see if I can add

  • listing chunks
  • filtering by chunk
  • recursive lookup ("this file is included in the chunk because it's included by file X, which is included by file Y, which is included by file Z") edit: realising now that this has some complexity to it and most definitely is scope creep.
  • some tests, of course

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

No branches or pull requests

1 participant