Vitest picks the wrong index from prisma package.json #2088
-
Prisma generates a package.json like this: {
"name": ".prisma/client",
"main": "index.js",
"types": "index.d.ts",
"browser": "index-browser.js"
} Vitest is configured for node testing: /// <reference types="vitest" />
import { defineConfig } from 'vite'
export default defineConfig({
test: {
environment: 'node',
},
esbuild: {
platform: 'node',
},
}) When running unit tests vitest picks the Is this behaviour by design, I would have expected it to pick the index pointed to by |
Beta Was this translation helpful? Give feedback.
Answered by
sheremet-va
Sep 26, 2022
Replies: 1 comment 1 reply
-
This is Vite bug, it will be fixed in the next Vite and Vitest version |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
garth
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is Vite bug, it will be fixed in the next Vite and Vitest version