webpack / webpack-cli

Webpack's Command Line Interface
https://webpack.js.org/api/cli
MIT License
2.56k stars 596 forks source link

feat: support webpack-bundle-analyzer with CLI #1838

Open anshumanv opened 3 years ago

anshumanv commented 3 years ago

Is your feature request related to a problem? Please describe. We can have an analyze flag which invokes webpack-bundle-analyzer as bundle information is crucial limiting size and determining potential bloats

Describe the solution you'd like we can list it in peer dep and use the analyzer which the user has installed instead of shipping out of the box to keep package size low.

Describe alternatives you've considered

Additional context /cc @evilebottnawi

alexander-akait commented 3 years ago

Yes:

alexander-akait commented 3 years ago

need implement schema for webpack-bundle-analyzer and read options from schema (can be done late)

to respect built-in options

webpack-bot commented 3 years ago

This issue had no activity for at least half a year.

It's subject to automatic issue closing if there is no activity in the next 15 days.

snitin315 commented 3 years ago

Bump

webpack-bot commented 2 years ago

This issue had no activity for at least half a year.

It's subject to automatic issue closing if there is no activity in the next 15 days.

snitin315 commented 2 years ago

Bump

webpack-bot commented 2 years ago

This issue had no activity for at least half a year.

It's subject to automatic issue closing if there is no activity in the next 15 days.

snitin315 commented 2 years ago

Let's start working on next first before adding more fetures.

webpack-bot commented 1 year ago

Issue was closed because of inactivity.

If you think this is still a valid issue, please file a new issue with additional information.

info-arnav commented 5 months ago

Hi, can you please providde a basic idea on how to proceed with this

info-arnav commented 5 months ago

Hi, can you please providde a basic idea on how to proceed with this

Like the basic implimentation would be to create a plugin webpack-bundle-analyzer adding a --analyze flag to automatically add the plugin maybe save the analysed data in a file

can you tell me about how can i go about the analyzing part, like the webpack functions or data to be used

info-arnav commented 5 months ago

Hi, can you please providde a basic idea on how to proceed with this

Like the basic implimentation would be to create a plugin webpack-bundle-analyzer adding a --analyze flag to automatically add the plugin maybe save the analysed data in a file

can you tell me about how can i go about the analyzing part, like the webpack functions or data to be used

@alexander-akait @snitin315

info-arnav commented 5 months ago

So Ill then start reffering to https://github.com/webpack-contrib/webpack-bundle-analyzer

info-arnav commented 5 months ago

As per what I see, we already have a --analyze flag added, which loads the webpack-bundle-analyzer plugin. I will try to add the plugin to webpack itself and then load it with the same.