webpack-contrib / webpack-bundle-analyzer

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

feat: add strictPort options #549

Closed PengBoUESTC closed 1 year ago

PengBoUESTC commented 1 year ago

add strictPort option, if current port is in use, set strictPort to false so that this plugin try to restart with next port!

linux-foundation-easycla[bot] commented 1 year ago

CLA Missing ID CLA Not Signed

valscion commented 1 year ago

Hi, thanks for opening a PR!

Is there a reason why analyzerPort: auto won't work for you? We already have that option so I'd rather avoid having two ways to achieve a similar result.

PengBoUESTC commented 1 year ago

analyzerPort

Actually , i didn't realize the meaning of analyzerPort: auto , maybe there should be some explanation of this value(auto) like this:

If analyzerPort is auto, the operating system will assign an arbitrary unused port,

If port is omitted or is 0, the operating system will assign an arbitrary unused port, which can be retrieved by using server.address().port after the 'listening' event has been emitted.

thanks a lot