Skip to content

Commit

Permalink
fix(ts-vitest): fixed ESM build for ts-vitest
Browse files Browse the repository at this point in the history
ts-vitest is meant to be imported by vitest as such it needs to be a proper ESM module. The
package.json already defined it as "type": "module", but the typescript build was still generating a
CommonJS build. This fix updates the typescript configuration to output an ESM module.

re #613
  • Loading branch information
Cellule committed Mar 4, 2024
1 parent ebe58f0 commit f7f19e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/testing/ts-vitest/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './mocks';
export * from './mocks.js';
4 changes: 3 additions & 1 deletion packages/testing/ts-vitest/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "./lib",
"rootDir": "./src"
"rootDir": "./src",
"module": "NodeNext",
"moduleResolution": "NodeNext"
},
"include": [
"./src"
Expand Down

0 comments on commit f7f19e3

Please sign in to comment.