Skip to content

compiler: Don't open a WebSocket server when the parent server is in middleware mode - #1797

Open
merlinf14b wants to merge 2 commits into
vanilla-extract-css:masterfrom
merlinf14b:compiler-disable-ws
Open

merlinf14b wants to merge 2 commits into
vanilla-extract-css:masterfrom
merlinf14b:compiler-disable-ws

Conversation

@merlinf14b

@merlinf14b merlinf14b commented Oct 21, 2026 •

Copy link
Copy Markdown

Fixes #1798

When the parent Vite server is in middleware mode (forwarded since #1696), the compiler's Vite server opens an unused WebSocket server on port 24678, so concurrent dev servers clash on it. This sets server.ws: false next to hmr: false.

Adds a test that compiles a file with server.middlewareMode: true and checks that port 24678 is still free. It fails on master and passes with the fix.

@changeset-bot

changeset-bot Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5c2a1ef

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

This PR includes changesets to release 1 package
Name Type
@vanilla-extract/compiler Patch

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

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.

compiler: Opens an unused WebSocket server on port 24678 when the parent Vite server is in middleware mode

1 participant