haoqunjiang / vite-jest

First-class Vite integration for Jest
MIT License
406 stars 51 forks source link

vite-jest fails to import module chunks? #12

Open bstro opened 3 years ago

bstro commented 3 years ago

running vite-jest 0.0.3, seeing the following issue: image

Same setup/configuration as in https://github.com/sodatea/vite-jest/issues/11 — I am not sure if this issue is related, the error message looked different enough for me to break this out in to a separate ticket.

Edit: I wonder if this may have something to do with yarn workspaces, and that these dependencies are hoisted into the root node_modules.

jmorel commented 3 years ago

This may be unrelated, but I had the very same issue when using node 14.14.* , I solved it by switching to node 14.17.*

jamesg1 commented 3 years ago

@bstro It appears the js and jsx declarations cause issues - fix here https://github.com/sodatea/vite-jest/pull/16/files