Repository navigation
Commit facdae6
feat(vitest-plugin): add vite 8 support
Accept vite 8 in the peer dependency range and test against it.
Vite 8 replaces esbuild and Rollup with Rolldown and Oxc. The plugin only
uses `name`, `apply`, `enforce` and `config`, none of which are affected
by the breaking changes, but two build-level adjustments are needed:
- Vite 8 publishes types through `exports` only, which the legacy
`moduleResolution: "node"` cannot read. Switch the package to
`moduleResolution: "bundler"`.
- rollup-plugin-dts forces `preserveSymlinks: true`, which prevents
TypeScript from reaching `rolldown` (a transitive dependency of vite 8)
in a pnpm store, leaving `Plugin` without its base members. Disable it
for the declaration build and keep `vite` external.
Bump the vitest dev dependency to ^4.1.11: vitest depends on vite
directly, and 4.1 is the first release accepting vite 8, so without it
the dev environment resolves two different vite copies.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 9338d9a commit facdae6
4 files changed
Lines changed: 582 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
0 commit comments