Skip to content

Commit 2efa152

Browse files
committed
test: add type module, then NodeNext is happy
1 parent 1f904d2 commit 2efa152

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

test/dts-fixture/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "@vitest/test-dts-fixture",
3+
"type": "module",
34
"private": true,
45
"scripts": {
56
"build": "rm -rf dist && tsc -p tsconfig.json",

test/dts-fixture/tsconfig.check.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
{
22
"compilerOptions": {
33
"target": "ESNext",
4-
// TODO: type check fails with NodeNext. probably we should fix this.
5-
// ../../packages/vitest/index.d.cts:1:15 - error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./dist/index.js")' call instead.
6-
// 1 export * from './dist/index.js'
7-
// ~~~~~~~~~~~~~~~~~
8-
"module": "ESNext",
9-
"moduleResolution": "Bundler",
4+
"module": "NodeNext",
5+
"moduleResolution": "NodeNext",
106
"types": [],
117
"strict": true,
128
"noEmit": true,

0 commit comments

Comments
 (0)