webpack-contrib / webpack-bundle-analyzer

Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap
MIT License
12.58k stars 488 forks source link

Union with Statoscope #406

Closed smelukov closed 1 year ago

smelukov commented 3 years ago

Hi! I'm the author of Statoscope. I want to suggest join webpack-bundle-analyzer with Statoscop. Statoscope is webpack analyzing tool with many features:

More info can be found here Let's discuss it in this issue )

valscion commented 3 years ago

Hi! Thanks for opening an issue to discuss this ☺️

Statoscope seems really nice. I haven't yet tried to run it in our own projects but I'll definitely take it for a spin when I get a nice slot for testing it out ☺️.

One thing we can at least do right now already is add a link to statoscope from our README somewhere so that people will find statoscope when they need it 😌. Would you be willing to open a pull request, adding a section "Other tools" before "Maintainers" section and then link to Statoscope and tell in one sentence why one might want to check out statoscope in addition to webpack-bundle-analyzer.

I'm mostly worried about not having the time or energy to join webpack-bundle-analyzer with another tool. I'm not yet sure if it's worth it to join efforts but we can definitely cross-promote each other 😊

smelukov commented 3 years ago

@valscion really thanks for that πŸ™. I've created a PR with Readme changes. Anyway, let's thought about how we can join efforts and do we really need this. Maybe we will realize that joining is useless or not so useful.

I'm mostly worried about not having the time or energy to join webpack-bundle-analyzer

I'm ready to help ;)

valscion commented 3 years ago

If I understood statoscope correctly, it only works based on the webpack Stats JSON, correct?

In that case, statoscope is indeed quite far from what webpack-bundle-analyzer offers as the core feature of webpack-bundle-analyzer is analyzing the end result bundles, not really the stats JSON object 😊. There are definitely room for a tool that analyzes the JSON object.

I fear that merging functionality of statoscope together with webpack-bundle-analyzer would make the project larger than we are willing to maintain. It's also a risk on the ecosystem to create such a big package if there's a risk that no-one's gonna be around to maintain it in the future if maintainment costs get too large

smelukov commented 3 years ago

If I understood statoscope correctly, it only works based on the webpack Stats JSON, correct?

Yep, for now, Statoscope analyzes stats object. I will add more functionality to analyze more stuff from the bundle

alexander-akait commented 3 years ago

It is possible to use statoscope inside webpack-bundle-analyzer?

smelukov commented 3 years ago

Statoscope is an application, with its own views, pages, routing, and data management So, technically, yes, we can use statoscope inside WBA, but I don't imagine how it will look. Another way is to add the features from WBA to statoscope

snoack commented 3 years ago

I recently worked on a project using Rollup, and had a chance to use rollup-plugin-visualizer. It looks very similar to webpack-bundle-analyzer but with one minor addition that was incredibly useful (and would make Statoscope mostly redundant for me), i.e. it indicated the sources a module was imported from along its size metrics. Maybe that is something worth considering to add to webpack-bundle-analyzer?