Skip to content

feat: run webpack-dev-server as a compiler plugin - #4847

Merged
alexander-akait merged 16 commits into
mainfrom
feat/dev-server-plugin-support
Oct 30, 2026
Merged

alexander-akait merged 16 commits into
mainfrom
feat/dev-server-plugin-support

Conversation

@bjohansebas

@bjohansebas bjohansebas commented Sep 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Run webpack-dev-server as a compiler plugin when it exposes apply(). The CLI starts watch compilation, prints build stats, and closes the compiler on signals or stdin EOF so the server stops through its shutdown hooks. Older dev servers keep their existing start()/stop() flow.

The plugin path disables the server's own signal handlers to avoid duplicate shutdown and preserves failure exit codes. A later successful rebuild clears a failure exit code. Duplicate ports in devServer configurations are detected before listening starts.

The middleware leaves printing stats to the CLI, so the dev server's devMiddleware.stats replace the configuration's stats, and the CLI sets them up the same way as configuration stats (a boolean or a preset string becomes an object, plus colors).

webpack-dev-server only logs a failure of the plugin's asynchronous listen() phase, e.g. a port that is already in use. The CLI wraps listen() of each dev server plugin it creates and, on a failure, sets the exit code to 2 and closes the compiler, the same as dev servers without plugin support. A TODO notes to remove the wrapper once webpack-dev-server reports listen failures to the compiler. Setup errors that reach the watch callback also exit with code 2.

Multi-compiler mode and --dev-server-per-compiler

webpack-dev-server 6 supports a multi-compiler both through apply(multiCompiler) and as a plugin in each configuration. Verified with webpack-dev-server 6.1 and two configurations with their own devServer:

Mode Server of the 1st config Server of the 2nd config
apply(multiCompiler) (default) both bundles both bundles
apply(childCompiler) (--dev-server-per-compiler) 1st bundle only 2nd bundle only
new DevServer() in each config's plugins 1st bundle only 2nd bundle only

By default, every dev server keeps serving all compilers, the same as dev servers without plugin support do. The new --dev-server-per-compiler option of webpack serve applies each dev server only to the compiler that defines it, and prints each compiler's stats using the devMiddleware.stats of its own dev server. Dev servers without plugin support (v5) ignore the option with a warning.

The workaround for dev servers without plugin support (the apply check, the v5 typings cast and the start()/stop() path) is marked with TODOs to remove in the next major release. webpack-dev-server is bumped to ^6.1.0 for development (validation in apply() and stopping before listen()).

What kind of change does this PR introduce?

Feature, with shutdown fixes and regression tests.

Did you add tests for your changes?

Yes. Tests cover compilation errors and warnings, middleware setup failures, a port already in use, exit status and shutdown through SIGINT/SIGTERM/stdin, resetting the failure exit code after a successful rebuild, duplicate signal handlers, serving rebuilt bundles, middleware stats, independent multi-compiler rebuilds with distinct watch options and shutdown hooks, webpack before 5.112, and which compilers each dev server serves with and without --dev-server-per-compiler. The duplicate-port snapshot is updated for validation before startup.

Does this PR introduce a breaking change?

No intended breaking change. Existing webpack-dev-server 5 integration remains on the imperative path. In plugin mode, the CLI owns signal handling even when setupExitSignals: true is configured, and shutdown preserves compilation failure status.

If relevant, what needs to be documented once your changes are merged or what have you already documented?

Added a minor changeset describing compiler plugin support and the --dev-server-per-compiler option, and regenerated SERVE-OPTIONS-v6.md. The serve documentation should explain CLI ownership of watch compilation, stats output, and shutdown with webpack-dev-server 6.

Use of AI

Codex assisted with the initial implementation, regression tests, code review, and this PR description. Claude Code rebased the PR onto main, verified the multi-compiler behaviour, added the --dev-server-per-compiler option, and fixed the listen-failure and exit-code handling and the flaky tests.

Summary by CodeRabbit

  • New Features
    • webpack serve now supports webpack-dev-server 6 as a compiler plugin, including watch builds and graceful shutdown.
    • In multi-compiler mode, each dev server serves all compilers by default. Use --dev-server-per-compiler to limit each server to its own compiler.
    • Multiple dev servers can select distinct automatic ports.
  • Improvements
    • Build statistics are displayed according to the configured middleware stats mode.
    • Failed rebuilds set a failing exit code, which clears after a successful rebuild.
  • Documentation
    • Added help and option documentation for --dev-server-per-compiler.

@changeset-bot

changeset-bot Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ad60c8c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
webpack-cli Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

This PR is packaged and the instant preview is available (9bcb6d5).

Install it locally:

  • npm
npm i -D create-webpack-app@https://pkg.pr.new/create-webpack-app@9bcb6d5 webpack-cli@https://pkg.pr.new/webpack-cli@9bcb6d5
  • yarn
yarn add -D create-webpack-app@https://pkg.pr.new/create-webpack-app@9bcb6d5 webpack-cli@https://pkg.pr.new/webpack-cli@9bcb6d5
  • pnpm
pnpm add -D create-webpack-app@https://pkg.pr.new/create-webpack-app@9bcb6d5 webpack-cli@https://pkg.pr.new/webpack-cli@9bcb6d5

@codecov

codecov Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.28571% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.07%. Comparing base (351f1c9) to head (ad60c8c).

Files with missing lines Patch % Lines
packages/webpack-cli/src/webpack-cli.ts 98.28% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4847      +/-   ##
==========================================
+ Coverage   94.85%   95.07%   +0.22%     
==========================================
  Files          14       14              
  Lines        5637     5873     +236     
  Branches      846      895      +49     
==========================================
+ Hits         5347     5584     +237     
+ Misses        289      288       -1     
  Partials        1        1              
Files with missing lines Coverage Δ
packages/webpack-cli/src/webpack-cli.ts 96.95% <98.28%> (+0.21%) ⬆️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 351f1c9...ad60c8c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@evenstensberg

Copy link
Copy Markdown
Member

Big pr, gonna review in depth this weekend

@bpthevenot-hub

Copy link
Copy Markdown

@copilot fix everything

@bjohansebas
bjohansebas force-pushed the feat/dev-server-plugin-support branch from 9d25338 to 006b502 Compare October 17, 2026 16:48
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The serve command adds plugin-based webpack-dev-server integration and the --dev-server-per-compiler option. It supports per-compiler server assignment, validates explicit ports, and assigns distinct automatic ports to multiple servers. Compiler configuration, stats output, and shutdown handling are shared with watch execution. New tests cover serving, ports, error handling, middleware stats, and rebuild behavior.

Priority: Normal

Merge Risk: Moderate · previous review d230e

With several dev servers sharing a multi-compiler setup, only the last server may serve compiled assets. Fix this before merge or limit the supported configurations. The earlier exit-code and listen-failure concerns are addressed.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the primary change: running webpack-dev-server as a compiler plugin.
Docstring Coverage Passed Docstring coverage is inconclusive: files from earlier reviews still need to be rechecked within the check's analysis limits. Not blocking.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches: 💡 1
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

avivkeller
avivkeller previously approved these changes Oct 17, 2026
bjohansebas and others added 6 commits October 29, 2026 11:40
In multi-compiler mode every dev server serves all compilers by default,
the same as dev servers without plugin support do. With the new option, each
dev server is applied as a plugin only to the compiler that defines it, and
each compiler's stats are printed using the stats options of its own dev
server. Dev servers without plugin support ignore the option with a warning.

Also require webpack-dev-server@6.1 for development and mark the workaround
for dev servers without plugin support for removal in the next major release.

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL
…pack serve`

With plugin support, `webpack serve` adds dev servers to the loaded
configuration as plugins: to the configuration that defines `devServer`
with `--dev-server-per-compiler`, otherwise to the top-level `plugins` of
the multi configuration. Then it compiles like `webpack watch`, reusing
its stats output, so `--json` works too. The old flow for dev servers
without plugin support is kept unchanged in the `else` branch.

webpack before 5.112 doesn't apply `plugins` of multi configurations, so
they are applied to the multi compiler before watching starts. TODOs mark
both workarounds for removal in the next major release.

Dev servers in plugin mode select ports before any of them listens, so
the CLI still assigns distinct automatic ports and rejects duplicate
explicit ports, otherwise one of the servers fails with EADDRINUSE.

The automatic ports test now picks ports below the ephemeral range, which
outgoing connections on Windows could take, and stops on EADDRINUSE instead
of waiting for the test timeout.

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL

Copy link
Copy Markdown
Member

Test - windows-latest - Node v24.x, Webpack latest, DevServer 5 failed on 04d3f13 because test/info/output.test.js timed out after 180s, with an orphaned powershell process left at job cleanup. This PR doesn't touch webpack info: main fails the same job the same way at 351f1c9 (test/info/basic.test.js times out, orphaned powershell), so it looks like an existing hang in envinfo on Windows runners. There's no fix for it yet. The next push to this PR re-runs CI.


Generated by Claude Code

Plugin mode dev servers select ports before any of them listens, so the
CLI picks distinct automatic ports itself. It now uses the dev server's own
`getFreePort()` (starting each search after the previously picked port)
instead of the `get-port` dependency, which is removed from `webpack-cli`.

Also simplify the plugin setup: one loop creates the dev servers and one
loop prepares the configurations (watch mode and middleware stats).

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL
On Windows, `envinfo` starts the browsers themselves to get their versions,
which can hang, e.g. the `info` tests time out on Windows CI runners.

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Fix the sticky failure exit code in plugin-mode serve. · webpack-cli.ts:2409-2410

packages/webpack-cli/src/webpack-cli.ts:2409-2410
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Fix the sticky failure exit code in plugin-mode serve.

#setupGracefulShutdown(compiler, true) exits with process.exitCode. The shared watch callback in #createWebpackCallback sets process.exitCode = 1 when a build has errors. The callback never clears it when a later rebuild succeeds.

Example trigger:

  1. A build fails with a syntax error.
  2. The developer fixes the file, and the rebuild succeeds.
  3. The developer presses ^C.

The CLI exits with code 1 although the last build was clean. npm scripts then print an error. The serve command exited with 0 on a signal before this change.

Track the result of the latest build in this mode. Do not keep the earliest failure.

One option is a per-build flag in #createWebpackCallback. Reset the flag on each callback invocation. Set process.exitCode from the flag only when the preserveExitCode mode is active. Keep the existing behavior for the single-run build command.


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f992d925-a917-4284-80fe-5eb294efa4fc
Commits

Reviewing files that changed from the base of the PR and between 04d3f13 and 5954947.

Files ignored due to path filters: 1
  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 1
  • packages/webpack-cli/src/webpack-cli.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

…ck serve`

A failed build sets the failure exit code, which `webpack serve` keeps on
shutdown. The code stayed set after the error was fixed, so stopping the dev
server after a successful rebuild still exited with 1. The stats callback now
clears the failure exit code it set when a later build succeeds.

Also test the fallback for webpack before 5.112, which doesn't apply
`plugins` of multi configurations.

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Major · Propagate asynchronous server listen failures. · webpack-cli.ts:2359

packages/webpack-cli/src/webpack-cli.ts:2359
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

Propagate asynchronous server listen failures.

If a selected port becomes unavailable before listen(), plugin mode logs the bind error but leaves watch compilation running without a server or a failure exit status. The watch callback cannot catch this error: webpack-dev-server starts listen() from its done hook and catches the rejection there. Provide a startup-error path that sets a nonzero status and closes the compiler. (raw.githubusercontent.com)


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 59609062-4b57-4929-bc07-064f8b7f8e07
Commits

Reviewing files that changed from the base of the PR and between 5954947 and f524913.

Files selected for processing: 5
  • packages/webpack-cli/src/webpack-cli.ts
  • test/serve/error-handling/recover.config.js
  • test/serve/error-handling/serve-error-handling.test.js
  • test/serve/per-compiler/old-webpack.js
  • test/serve/per-compiler/serve-per-compiler.test.js

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

As a plugin, webpack-dev-server starts listening after the first build
and only logs a failure, e.g. a port already in use, so the CLI kept
watching without a dev server and exited with 0. The CLI now sets the
exit code to 2 and closes the compiler, as it does for dev servers
without plugin support.

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL

Copy link
Copy Markdown
Member

@coderabbitai both findings outside the diff are addressed:

  • Sticky failure exit code in plugin-mode serve: fixed in f524913. The stats callback clears the failure exit code it set once a later build succeeds. Covered by "should reset the failure exit code after a successful rebuild".
  • Asynchronous listen failures: fixed in a70dff9. The CLI wraps listen() of each dev server plugin it creates. On a failure, e.g. EADDRINUSE, it sets the exit code to 2 and closes the compiler, the same as dev servers without plugin support. The plugin still logs the error. Covered by "should log the error and exit when the port is already in use". The TODO is to drop the wrapper once webpack-dev-server reports listen failures to the compiler.

Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@alexander-akait Thanks for addressing both findings and adding regression tests. The reported fixes cover successful rebuild recovery and compiler shutdown with exit code 2 after a listen() failure.

I have not independently verified the commits or test results.


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

You are interacting with an AI system.

The test fixed the entry once, right after the first failed build, which
the watcher could miss: it can start watching after that write, and on
macOS the temporary directory is behind a symlink. The test now uses the
real path and rewrites the fix until a rebuild succeeds.

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL

Copy link
Copy Markdown
Member

@coderabbitai review

The merge risk in the summary is based on f524913. Since then, a70dff9 exits with code 2 when a dev server fails to listen, and 6514be0 makes the rebuild recovery test stable on macOS.


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

The middleware stats replace the configuration's stats, and the CLI now
normalizes them with the same code it uses for the configuration (a
boolean or a preset string to an object, and colors), instead of its own
conversion.

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL
The `info` tests time out on Windows only at random, so keep detecting
browsers there, and drop the changeset.

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL

Copy link
Copy Markdown
Member

@coderabbitai review

Since the last review, two things changed. 817c7ae sets up the dev middleware stats with the same #setupStats() the CLI uses for configuration stats, replacing its own conversion. d230ec8 reverts the Windows webpack info change and its changeset.


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up Comments

Outside diff Share the output filesystem when servers share a compiler.

2365-2365: Major · Functional Correctness · Heavy lift

Share the output filesystem when servers share a compiler.

When multiple dev servers use default multi-compiler mode, each middleware instance creates its own memfs and assigns it to the shared child compilers. The last assignment becomes the compiler output filesystem. Earlier servers retain their own middleware filesystem and can serve no compiled assets.

Pass one shared devMiddleware.outputFileSystem to all servers, or keep each server bound to its own compiler.

Open the source location


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2ac892bc-3571-4776-a2f0-ada662cdcbde
Commits

Reviewing files that changed from the base of the PR and between 6514be0 and d230ec8.

Files selected for processing: 1
  • packages/webpack-cli/src/webpack-cli.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Copy link
Copy Markdown
Member

@coderabbitai on "Share the output filesystem when servers share a compiler": it is right that each middleware creates its own memfs and assigns it to the compilers, so the last assignment wins. But the middleware doesn't serve from its own context.outputFileSystem. For each request it reads from compilation.compiler.outputFileSystem (webpack-dev-middleware/dist/middleware.js, the getFilenameFromUrl path). That is the filesystem webpack actually emitted to, so every dev server serves every bundle.

test/serve/per-compiler/serve-per-compiler.test.js covers this. "should serve all compilers by every dev server by default" starts two dev servers in the default multi-compiler mode and gets 200 for every bundle from every server (app:app, app:admin, admin:app, admin:admin). The same test also runs with webpack before 5.112. So I'm leaving it as is.


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
ast-grep outline test/serve/per-compiler/serve-per-compiler.test.js --items all
sed -n '1,200p' test/serve/per-compiler/serve-per-compiler.test.js
ast-grep outline test/serve/per-compiler/old-webpack.js --items all
sed -n '1,80p' test/serve/per-compiler/old-webpack.js

Length of output: 5694


@alexander-akait You’re right. My finding assumed that middleware serves files from its own context.outputFileSystem. With requests using compilation.compiler.outputFileSystem, separate middleware filesystems do not establish the serving failure I claimed. I withdraw “Share the output filesystem when servers share a compiler.” No change is needed for this finding.

I inspected test/serve/per-compiler/serve-per-compiler.test.js. Both default-mode tests assert HTTP 200 for all four server/bundle pairs. The compatibility test uses old-webpack.js to report version 5.111.0 and exercise the older-version CLI path; it does not load an older webpack implementation. I did not run the tests.

You are interacting with an AI system.

Copy link
Copy Markdown
Member

CI on d230ec8: "Test - windows-latest - Node v26.x, Webpack latest, DevServer latest" failed only because test/info/output.test.js › "gets info text by default" ran past the 180 s timeout. webpack info hangs at random on Windows runners while envinfo detects browsers, and this also happens on main. The Windows workaround was dropped from this PR on purpose (d230ec8), so no fix is ported. Fail-fast cancelled the other jobs, so I'll re-run the failed and cancelled jobs once the run completes.


Generated by Claude Code

execa sends SIGKILL 5 seconds after SIGTERM, so a slow graceful shutdown
lost its exit code on macOS.

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL
alexander-akait added a commit that referenced this pull request Oct 30, 2026
* test: make the generator and dev server tests stable

The `create-webpack-app` tests install real packages, and a registry
hiccup made npm fail, which the tests only reported as a missing line in
stdout. npm now prefers its cache and retries requests more, without the
audit, fund and update-notifier requests, and a failed install fails the
test with npm's error.

The dev server tests took ports from the ephemeral range, where outgoing
connections or another Jest worker could take them before the server
listened. Each worker now takes ports from its own range below the
ephemeral ones.

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL

* test: keep npm's default retries for the generator tests

More retries made a failing install outlast the test timeout, which then
hid npm's error.

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL

* test: keep the port ranges of Jest workers within valid ports

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL

* test: give up to 120 Jest workers their own port range

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL

* fix: don't detect browsers in `webpack info` on Windows

On Windows, `envinfo` starts the browsers themselves to get their versions,
which can hang, e.g. the `info` tests time out on Windows CI runners.

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL

* test: don't let npm prefer its cache in the generator tests

With `prefer-offline`, npm used cached metadata that lacked a version a
freshly fetched package depended on, and the install failed with
ETARGET (`@babel/generator@^8.0.10`) on Windows CI.

Also add a changeset for not detecting browsers in `webpack info` on
Windows.

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL

* chore: move the `webpack info` changeset to #4847

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL

* revert: detect browsers in `webpack info` on Windows again

The `info` tests time out on Windows only at random, so keep detecting
browsers there.

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL

* test: give each Jest worker its own Yarn cache in the generator tests

The init, loader and plugin tests install with Yarn in parallel Jest
workers. Yarn 1 can't fill one cache from two installs at the same time,
and an install failed on macOS CI reading a half-written package.json
from the shared cache.

Claude-Session: https://claude.ai/code/session_013FhutRFjuQemBzekJMYcqL
@alexander-akait
alexander-akait merged commit 9bcb6d5 into main Oct 30, 2026
35 checks passed
@alexander-akait
alexander-akait deleted the feat/dev-server-plugin-support branch October 30, 2026 13:06
markharding pushed a commit to futo-org/Harbor that referenced this pull request Nov 3, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [webpack-cli](https://github.com/webpack/webpack-cli/tree/main/packages/webpack-cli) ([source](https://github.com/webpack/webpack-cli)) | [`7.2.3` → `7.3.1`](https://renovatebot.com/diffs/npm/webpack-cli/7.2.3/7.3.1) | ![age](https://developer.mend.io/api/mc/badges/age/npm/webpack-cli/7.3.1?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/webpack-cli/7.2.3/7.3.1?slim=true) |

---

### Release Notes

<details>
<summary>webpack/webpack-cli (webpack-cli)</summary>

### [`v7.3.1`](https://github.com/webpack/webpack-cli/blob/HEAD/CHANGELOG.md#731)

[Compare Source](https://github.com/webpack/webpack-cli/compare/webpack-cli@7.3.0...webpack-cli@7.3.1)

##### Patch Changes

- fix: detect missing package managers and failed installations, without a lock file the CLI chose npm even when it wasn't installed instead of yarn or pnpm, and it continued after a package failed to install (by [@&#8203;alexander-akait](https://github.com/alexander-akait) in [#&#8203;4889](webpack/webpack-cli#4889))

- chore: replace the `import-local` and `cross-spawn` dependencies with Node.js built-ins (by [@&#8203;alexander-akait](https://github.com/alexander-akait) in [#&#8203;4889](webpack/webpack-cli#4889))

- chore: load configuration files with `import()` instead of `eval` (by [@&#8203;alexander-akait](https://github.com/alexander-akait) in [#&#8203;4893](webpack/webpack-cli#4893))

### [`v7.3.0`](https://github.com/webpack/webpack-cli/blob/HEAD/CHANGELOG.md#730)

[Compare Source](https://github.com/webpack/webpack-cli/compare/webpack-cli@7.2.3...webpack-cli@7.3.0)

##### Minor Changes

- feat: run `webpack-dev-server@6` as a compiler plugin. The CLI drives watch compilation, prints build stats and closes the compiler on shutdown. Older dev servers continue to manage their own compilation. (by [@&#8203;bjohansebas](https://github.com/bjohansebas) in [#&#8203;4847](webpack/webpack-cli#4847))

  In multi-compiler mode, every dev server serves all compilers by default. Use the new `--dev-server-per-compiler` option of `webpack serve` to serve each compiler only by the dev server from its own configuration.

- feat: add shell completions for zsh, bash, fish and powershell through the `complete` command (by [@&#8203;alexander-akait](https://github.com/alexander-akait) in [#&#8203;4840](webpack/webpack-cli#4840))

##### Patch Changes

- fix: keep multi-compiler options such as `parallelism` and `plugins` set on a configuration array when `--config-name` or `extends` rebuild it (by [@&#8203;alexander-akait](https://github.com/alexander-akait) in [#&#8203;4871](webpack/webpack-cli#4871))

- perf: share the compile cache with child processes and worker threads, such as minimizer workers, so they start warm too (by [@&#8203;alexander-akait](https://github.com/alexander-akait) in [#&#8203;4872](webpack/webpack-cli#4872))

- fix: assign distinct ports to dev servers of configurations that share the same `devServer` object. (by [@&#8203;alexander-akait](https://github.com/alexander-akait) in [#&#8203;4886](webpack/webpack-cli#4886))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 9am on tuesday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODguMiIsInVwZGF0ZWRJblZlciI6IjQ0LjE4OC4yIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==-->

Reviewed-on: https://code.futo.org/harbor/harbor/pulls/2163
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants