diff --git a/docs/config/api.md b/docs/config/api.md index 6bf6ea6e924d..8c973dbbd94e 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 e2fe7349e7a3..ccc3061d7e3a 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 cdd4e25723db..8ea3253b7c54 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 7fa4e62d9ffa..590c844aff66 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 5b20a39018ed..367da7d73553 100644 --- a/packages/ui/vite.config.ts +++ b/packages/ui/vite.config.ts @@ -69,7 +69,7 @@ function devUiScriptPlugin(): Plugin { const BROWSER_SCRIPT_RE = /