Commit adb269c
fix: add type:module and exports field to resolve ESM/CJS CI failures
vitest 4.x requires ESM context to load its config. Without "type": "module",
Node 18.x fails with ERR_REQUIRE_ESM when vitest/dist/config.cjs tries to
require std-env (an ESM-only package). Adding "type": "module" makes vitest
load the config as ESM and also aligns the dist output (now proper ESM exports)
with the tsconfig NodeNext module mode. Added an exports field for correct
package resolution by modern bundlers and Node.js.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent ae9e69e commit adb269c
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
7 | 14 | | |
8 | 15 | | |
9 | 16 | | |
| |||
0 commit comments