Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a patch to the vitest resolver to ensure proper module identity when using package aliases. The patch resolves both @voidzero-dev/vite-plus/test and @voidzero-dev/vite-plus-test directly to the bundled vitest distribution, bypassing re-export chains that break module identity in Vite's SSR transform, particularly affecting expect.extend() mutations.
Key Changes:
- Introduces
patchVitestCoreResolver()function to patch the VitestCoreResolver'sresolveIdmethod - Adds direct resolution for CLI test package aliases and their subpaths
- Integrates the new patch into the post-processing step of the build flow
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9b441df to
e5d5428
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merge activity
|

Note
Patches Vitest resolver and test build to resolve package aliases directly, aligns browser context/provider exports, and fixes type/module augmentations.
packages/test/build.ts):VitestCoreResolverto resolve@voidzero-dev/vite-plus/testand@voidzero-dev/vite-plus-testdirectly todist/index.js, with subpath routing tovitest/*.global.d.*.d.ts-> relative paths), Chai type reference in@vitest/expect/index.d.ts, and mockerhoistedModuleto accept package aliases../contextand./browser/contextto./dist/@vitest/browser/context.js(preserve single module identity)../browser/providers/{playwright,webdriverio,preview}subpath exports in bothpackages/testandpackages/cli.build.ts:.d.tsshims now include side-effect import beforeexport *to keep module augmentations.@types/chaito test package; addplaywrightas a root devDependency.Written by Cursor Bugbot for commit caf4aca. This will update automatically on new commits. Configure here.