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

Contributing Questions #197

Closed
funinvegas opened this issue Jul 7, 2018 · 2 comments
Closed

Contributing Questions #197

funinvegas opened this issue Jul 7, 2018 · 2 comments

Comments

@funinvegas
Copy link

I want a tool that allows me to compare two builds to see where bytes/chunks/modules have been added and where they have been removed. We use webpack-bundle-analyzer to understand the current state, but need a tool to understand the deltas. I would like to add some visuals help to make it easier to understand why our packages have grown to what they are.

I am looking at creating my own webpack-bundle-analyzer like thing, but I'd rather contribute to this project if that would be an acceptable feature.

The change I would be trying to make is allow you to pass a second stats.json and view the two side by side, with differences highlighted by color in some way.

Questions:

  1. Would this be an appropriate feature for webpack-bundle-analyzer? or should I create a separate tool?
  2. I see there is a version 3 in the works, should I be using that as a base instead of master?
  3. Any pointers on what files/functions I should start at? I haven't figured out the code base enough yet to know where things are, but I haven't invested that much time yet.

Thanks,
Josh.

Issue description

...

Technical info

  • Webpack Bundle Analyzer version:
  • Webpack version:
  • Node.js version:
  • npm/yarn version:
  • OS:

Debug info

How do you use this module? As CLI utility or as plugin?

If CLI, what command was used? (e.g. webpack-bundle-analyzer -O path/to/stats.json)

If plugin, what options were provided? (e.g. new BundleAnalyzerPlugin({ analyzerMode: 'disabled', generateStatsFile: true }))

What other Webpack plugins were used?

It would be nice to also attach webpack stats file.
It can be generated using these options:

new BundleAnalyzerPlugin({
  analyzerMode: 'disabled',
  generateStatsFile: true,
  // Excludes module sources from stats file so there won't be any sensitive data
  statsOptions: { source: false }
})`

stats.json will be created in Webpack bundle output directory.

@valscion
Copy link
Member

Hi! Thanks for asking.

Would this be an appropriate feature for webpack-bundle-analyzer? or should I create a separate tool?

Maybe creating a fork and a proof of concept would be a good approach first, and if we think that it's better to leave it outside webpack-bundle-analyzer, you're free to create another package with a different name ☺️

I see there is a version 3 in the works, should I be using that as a base instead of master?

Nah, that branch has been stale for quite some time so it's better to start from master. #97 would've probably helped in creating this tool quite a lot, though, so if you're adventorous, you can take a look at the bits and pieces extracted in there if they're suitable to you. Note that the code in that PR/branch is quite outdated and bug fixes haven't been merged back to that branch for quite some time.

Any pointers on what files/functions I should start at? I haven't figured out the code base enough yet to know where things are, but I haven't invested that much time yet.

I'm afraid I don't have time to give guidance on this. Sorry

@valscion
Copy link
Member

I'll close this issue as inactive. Feel free to create a new issue or continue discussion here if you'd like to, even if the issue is closed

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

No branches or pull requests

2 participants