By default, webpack bundle analyzer starts a server, which means that the webpack process will never terminate.
This is undesirable in CI and other non-interactive environments - your jobs will hang indefinitely. Currently (as far as I can tell) there's no way to prevent this from happening without changing the webpack configuration code. This isn't always possible in CI (e.g. it's someone else's code, or it's an older version of your own code prior to the configuration change.)
It would be great if there was some way to override the analyzerMode setting from the command-line, e.g. WEBPACK_BUNDLE_ANALYZER_MODE=json which could be set in non-interactive environments to ensure that the process will never hang.
Issue description
By default, webpack bundle analyzer starts a server, which means that the webpack process will never terminate.
This is undesirable in CI and other non-interactive environments - your jobs will hang indefinitely. Currently (as far as I can tell) there's no way to prevent this from happening without changing the webpack configuration code. This isn't always possible in CI (e.g. it's someone else's code, or it's an older version of your own code prior to the configuration change.)
It would be great if there was some way to override the
analyzerMode
setting from the command-line, e.g.WEBPACK_BUNDLE_ANALYZER_MODE=json
which could be set in non-interactive environments to ensure that the process will never hang.Happy to submit a PR if this sounds useful.
Technical info