Skip to content

Commit

Permalink
fix(#59): typeerror - default is not a function
Browse files Browse the repository at this point in the history
We're shipping both `./dist/vitest-fail-on-console.es.js` and `./dist/vitest-fail-on-console.umd.js` with "type": "module".
Since Vitest only runs `esm` in the test environment (doesn't use require), we can only ship the default export as `./dist/vitest-fail-on-console.es.js`

Thanks to @hi-ogawa - vitest-dev/vitest#6352 (comment)
  • Loading branch information
thomasbrodusch committed Sep 2, 2024
1 parent d6b7b3b commit f45eecd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@
],
"exports": {
".": {
"import": "./dist/vitest-fail-on-console.es.js",
"require": "./dist/vitest-fail-on-console.umd.js",
"types": "./dist/index.d.ts"
"types": "./dist/index.d.ts",
"default": "./dist/vitest-fail-on-console.es.js"
}
},
"types": "./dist/index.d.ts",
Expand Down

0 comments on commit f45eecd

Please sign in to comment.