From a2ec4166dbafd9d2897df259de4b8d146c59cc6a Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Mon, 19 Oct 2026 17:36:34 +0900 Subject: [PATCH] fix(browser): change default port to 23315 (#11640) Co-authored-by: Hiroshi Ogawa <4232207+hi-ogawa@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 --- docs/config/api.md | 2 +- docs/guide/browser/index.md | 2 +- docs/guide/migration/index.md | 2 +- packages/ui/CONTRIBUTING.md | 2 +- packages/ui/vite.config.ts | 2 +- packages/vitest/src/constants.ts | 2 +- test/browser/specs/browser-multiple.test.ts | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/config/api.md b/docs/config/api.md index 6bf6ea6e9..8c973dbbd 100644 --- a/docs/config/api.md +++ b/docs/config/api.md @@ -9,7 +9,7 @@ outline: deep - **Default:** `false` - **CLI:** `--api`, `--api.port`, `--api.host`, `--api.strictPort` -Listen to port and serve API for [the UI](/guide/ui) or [browser server](/guide/browser/). When set to `true`, the default port is `51204` or `63315` if running in Browser Mode. +Listen to port and serve API for [the UI](/guide/ui) or [browser server](/guide/browser/). When set to `true`, the default port is `51204` or `23315` if running in Browser Mode. In Browser Mode the server binds its port on the first browser launch, unless `api` or `ui` is enabled. diff --git a/docs/guide/browser/index.md b/docs/guide/browser/index.md index e2fe7349e..ccc3061d7 100644 --- a/docs/guide/browser/index.md +++ b/docs/guide/browser/index.md @@ -138,7 +138,7 @@ export default defineConfig({ ``` ::: info -Vitest assigns port `63315` to avoid conflicts with the development server, allowing you to run both in parallel. You can change that with the [`api`](/config/api) option. The port is bound when the first browser is launched, or on startup if `api` or `ui` is enabled. +Vitest assigns port `23315` to avoid conflicts with the development server, allowing you to run both in parallel. You can change that with the [`api`](/config/api) option. The port is bound when the first browser is launched, or on startup if `api` or `ui` is enabled. ::: If you have not used Vite before, make sure you have your framework's plugin installed and specified in the config. Some frameworks might require extra configuration to work - check their Vite related documentation to be sure. diff --git a/docs/guide/migration/index.md b/docs/guide/migration/index.md index cdd4e2572..8ea3253b7 100644 --- a/docs/guide/migration/index.md +++ b/docs/guide/migration/index.md @@ -531,7 +531,7 @@ If you manually opened the browser preview by copying the Vite server URL or vis ## `browser.api` Is Replaced by the Top-Level `api` -Browser mode now runs on a single Vite server configured by the top-level [`api`](/config/api) option; the default port in browser mode is still `63315`. The `browser.api` option is deprecated and no longer has any effect, so move its value to `api`: +Browser mode now runs on a single Vite server configured by the top-level [`api`](/config/api) option; the default port in browser mode is `23315`. The `browser.api` option is deprecated and no longer has any effect, so move its value to `api`: ```ts [vitest.config.ts] import { defineConfig } from 'vitest/config' diff --git a/packages/ui/CONTRIBUTING.md b/packages/ui/CONTRIBUTING.md index 7fa4e62d9..590c844af 100644 --- a/packages/ui/CONTRIBUTING.md +++ b/packages/ui/CONTRIBUTING.md @@ -49,7 +49,7 @@ BROWSER_DEV=true pnpm -C packages/ui dev:client Open the URL printed by the UI dev server, usually `http://localhost:5173/`. -The UI dev server fetches browser runner state from the browser runner server on port `63315` by default. If Vitest prints a different browser runner port, pass it to the UI dev server: +The UI dev server fetches browser runner state from the browser runner server on port `23315` by default. If Vitest prints a different browser runner port, pass it to the UI dev server: ```bash BROWSER_DEV_PORT=63316 BROWSER_DEV=true pnpm -C packages/ui dev:client diff --git a/packages/ui/vite.config.ts b/packages/ui/vite.config.ts index 5b20a3901..367da7d73 100644 --- a/packages/ui/vite.config.ts +++ b/packages/ui/vite.config.ts @@ -69,7 +69,7 @@ function devUiScriptPlugin(): Plugin { const BROWSER_SCRIPT_RE = /