You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(test): update BUNDLING.md for new import path options
Document the enhanced vendor-aliases plugin capabilities:
- vitest/browser-playwright now works when vitest is overridden
- @voidzero-dev/vite-plus-test/* subpaths are supported
- Clarify the two config file import options
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
**Note:** pnpm overrides don't affect Node.js module resolution at config load time, so config files must use the `@voidzero-dev/vite-plus-test/browser-playwright` import path.
111
+
**Note:** When using pnpm overrides, you have two options for the playwright import:
112
+
113
+
-`vitest/browser-playwright` - works when `vitest` is overridden to our package
114
+
-`@voidzero-dev/vite-plus-test/browser-playwright` - always works (direct import)
115
+
116
+
Importing from `@vitest/browser-playwright` requires an additional override for that specific package.
112
117
113
118
### package.json Changes
114
119
@@ -151,8 +156,11 @@ overrides:
151
156
// Before
152
157
import { playwright } from '@vitest/browser-playwright';
153
158
154
-
// After
159
+
// After - Option 1: Direct import (always works)
155
160
import { playwright } from '@voidzero-dev/vite-plus-test/browser-playwright';
161
+
162
+
// After - Option 2: Via vitest subpath (works when vitest is overridden)
163
+
import { playwright } from 'vitest/browser-playwright';
156
164
```
157
165
158
166
### Plugin Exports for pnpm Overrides
@@ -315,7 +323,11 @@ This is achieved through:
315
323
1. Conditional exports in package.json (`"node": "./dist/index-node.js"`)
316
324
2. Browser-safe stubs for `module-runner`
317
325
3. Import rewriting to prevent Node.js code from being pulled into browser bundles
318
-
4.`vendor-aliases` plugin injection to resolve imports at runtime
326
+
4.`vendor-aliases` plugin injection to resolve imports at runtime:
327
+
- Handles `@vitest/*` imports → resolves to copied `dist/@vitest/` files
0 commit comments