You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests that were passing with vitest@2 are now failing when they use a library such as react-use or emotion (a dependency of MUI). In our test suite, it's like 90% of tests :/ The error is
Error: require() of ES Module /data/dev/vitest-v3-require-esm/node_modules/tslib/tslib.es6.mjs not supported.
Instead change the require of /data/dev/vitest-v3-require-esm/node_modules/tslib/tslib.es6.mjs to a dynamic import() which is available in all CommonJS modules.
❯ Object.<anonymous> node_modules/react-use/lib/factory/createReducer.js:3:15
Describe the bug
Hello,
Tests that were passing with vitest@2 are now failing when they use a library such as
react-use
oremotion
(a dependency ofMUI
). In our test suite, it's like 90% of tests :/ The error isI created a repo with an easy reproduction, really nothing weird except a component using
react-use
: https://github.com/ddolcimascolo/vitest-v3-require-esmA few details on the environment
Anything I can do to help, just ask.
Thanks !
David
Reproduction
https://github.com/ddolcimascolo/vitest-v3-require-esm
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: