Describe the bug
Configuring Vitest browser mode through vite-plus's defineConfig fails to type-check when the provider is set to playwright() imported from @vitest/browser-playwright.
@voidzero-dev/vite-plus-test bundles its own copy of vitest internals (currently 4.1.5) inside its dist/, and declares @vitest/browser-playwright only as a devDependency rather than a peerDependency. When a downstream project installs @vitest/browser-playwright directly (e.g. via bun add), two structurally-identical but nominally-distinct copies of the vitest type tree end up loaded. TypeScript trips on private fields like _clearScreenPending and reports a long incompatibility chain ending in Types have separate declarations of a private property '_clearScreenPending'.
Runtime is fine — tests execute and pass. The bug is purely a types/packaging mismatch.
Reproduction
https://github.com/kotkoroid/vite-plus-vitest-browser-types-repro
Steps to reproduce
bun run check runs tsc --noEmit and produces the type error chain ending in:
Types have separate declarations of a private property '_clearScreenPending'.
bun run test succeeds — the failure is purely at the type level.
System Info
VITE+ - The Unified Toolchain for the Web
vp v0.0.0
Local vite-plus:
vite-plus v0.1.20
Tools:
vite v8.0.10
rolldown v1.0.0-rc.17
vitest v4.1.5
oxfmt v0.46.0
oxlint v1.61.0
oxlint-tsgolint v0.22.0
tsdown v0.21.10
Used Package Manager
bun
Logs
Validations
Describe the bug
Configuring Vitest browser mode through
vite-plus'sdefineConfigfails to type-check when theprovideris set toplaywright()imported from@vitest/browser-playwright.@voidzero-dev/vite-plus-testbundles its own copy of vitest internals (currently4.1.5) inside itsdist/, and declares@vitest/browser-playwrightonly as adevDependencyrather than apeerDependency. When a downstream project installs@vitest/browser-playwrightdirectly (e.g. viabun add), two structurally-identical but nominally-distinct copies of the vitest type tree end up loaded. TypeScript trips on private fields like_clearScreenPendingand reports a long incompatibility chain ending inTypes have separate declarations of a private property '_clearScreenPending'.Runtime is fine — tests execute and pass. The bug is purely a types/packaging mismatch.
Reproduction
https://github.com/kotkoroid/vite-plus-vitest-browser-types-repro
Steps to reproduce
bun run checkrunstsc --noEmitand produces the type error chain ending in:bun run testsucceeds — the failure is purely at the type level.System Info
VITE+ - The Unified Toolchain for the Web vp v0.0.0 Local vite-plus: vite-plus v0.1.20 Tools: vite v8.0.10 rolldown v1.0.0-rc.17 vitest v4.1.5 oxfmt v0.46.0 oxlint v1.61.0 oxlint-tsgolint v0.22.0 tsdown v0.21.10Used Package Manager
bun
Logs
Validations