webpack-contrib / webpack-bundle-analyzer

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

Ability to search chunk by name #457

Closed Herz3h closed 1 year ago

Herz3h commented 3 years ago

Issue description

I'm trying to search by chunk name from the list of generated chunks by webpack (which have names similar to 1.js, 2.js, these correspond to chunks issued due to code splitting) but upon searching it doesn't find them.

Technical info

npx : 1 installé(s) en 1.765s

  System:
    OS: macOS 10.15.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 113.52 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 10.24.0 - ~/.nvm/versions/node/v10.24.0/bin/node
    Yarn: 1.16.0 - ~/.yarn/bin/yarn
    npm: 6.14.11 - ~/.nvm/versions/node/v10.24.0/bin/npm
  npmPackages:
    assets-webpack-plugin: ^5.1.2 => 5.1.2
    brotli-webpack-plugin: ^1.1.0 => 1.1.0
    compression-webpack-plugin: ^5.0.2 => 5.0.2
    copy-webpack-plugin: ^6.4.1 => 6.4.1
    csso-webpack-plugin: ^2.0.0-beta.3 => 2.0.0-beta.3
    hard-source-webpack-plugin-fixed-hashbug: ^0.13.2 => 0.13.2
    optimize-css-assets-webpack-plugin: ^5.0.6 => 5.0.6
    speed-measure-webpack-plugin: ^1.5.0 => 1.5.0
    terser-webpack-plugin: ^3.1.0 => 3.1.0
    webpack: ^4.46.0 => 4.46.0
    webpack-bundle-analyzer: ^4.4.2 => 4.4.2
    webpack-cli: ^3.3.12 => 3.3.12
    webpack-dashboard: ^3.3.3 => 3.3.3
    webpack-dev-server: ^3.11.2 => 3.11.2
    webpack-merge: ^4.2.2 => 4.2.2
    webpack-notifier: ^1.13.0 => 1.13.0
    webpack-watched-glob-entries-plugin: ^2.1.9 => 2.1.9
    wildcards-entry-webpack-plugin: ^2.1.0 => 2.1.0

Debug info

new BundleAnalyzerPlugin({ openAnalyzer: false })
valscion commented 3 years ago

Are you able to post a screencapture of how the search feature seems to be broken in your use case? https://getkap.co/ is a good tool for that if you don't have a way to screencapture yet :)

Herz3h commented 3 years ago

Will post screenshot tomorrow since I'm not at work anymore, however I started looking into code, and it seems to be the normal behavior https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/master/client/store.js#L97 as it only looks in a chunk.groups's labels for matches

valscion commented 3 years ago

Thanks! If that's the case, then this might be a new feature and not a regression if we've never supported searching by chunk name before :smile:

A screenshot or a screen recording would both still be useful to make sure we're talking of the same thing ☺️

Herz3h commented 3 years ago

Here is an example:

Capture d’écran 2021-07-16 à 10 55 28

_Unrelated: Is it normal that I have to restart gulp watch every time I make a change to a file in client/ ?

valscion commented 3 years ago

Unrelated: Is it normal that I have to restart gulp watch every time I make a change to a file in client/ ?

I don't know :smile:. It might be that some watching is broken, so feel free to investigate if you happen to find out that it is the case :)