Skip to content

fix(core): support ipx 4 in the dev middleware - #11

Open
BleedingDev wants to merge 1 commit into
rstackjs:mainfrom
BleedingDev:feat/ipx-4-node-handler
Open

BleedingDev wants to merge 1 commit into
rstackjs:mainfrom
BleedingDev:feat/ipx-4-node-handler

Conversation

@BleedingDev

@BleedingDev BleedingDev commented Sep 25, 2026 •

Copy link
Copy Markdown

IPX programmatic API

Why the change

IPX 4 replaces the dev middleware factory, so the image plugin must support its new handler while retaining IPX 3 compatibility.

Special things to note

  • The peer range is bounded to IPX 3 and 4 and explicitly permits v4 prereleases.
  • Real Rsbuild dev-server requests return 48px WebP images on both installed IPX 4 and the IPX 3 alias; all 12 unit suites pass with 107 tests and 13 existing skips.
  • Core/react CJS/ESM and declaration builds and 90 Biome checks pass; current-head upstream workflows require approval.

Change outline

 peerDependencies.ipx
-  >=3.0.3
+  ^3.0.3 || ^4.0.0-0

 dev middleware
-  createIPXNodeServer(ipx)
+  createIPXNodeHandler(ipx) when available
+  otherwise createIPXNodeServer(ipx)

ipx 4 replaced createIPXNodeServer with createIPXNodeHandler. The dev
middleware now uses createIPXNodeHandler when available and falls back
to createIPXNodeServer for ipx 3. The ipx peer range becomes
^3.0.3 || ^4.0.0-0 so ipx 4 prereleases satisfy strict peer installs.

Adds a dev-server test that requests an image through the middleware
with both ipx 4 and ipx 3.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant