fix(devtools-vite): inject the bus port into pre-bundled dependency chunks (#538)

Vite pre-bundles npm installs of @tanstack/react-devtools into chunks under
node_modules/.vite/deps. Their ids do not contain "@tanstack/devtools", so
connection-injection skipped them and __TANSTACK_DEVTOOLS_PORT__ stayed in
the code. The browser then always dialed 4206, also when the server bus moved
to another port.

The examples link packages with workspace:*, and Vite does not pre-bundle
linked packages, so the examples did not show the bug.

Fixes #536
This commit is contained in:
Alem Tuzlak 2026-10-29 16:16:57 +01:00 • committed by GitHub
commit 7cb0a8d4ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 1 deletions