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
Hello, I've been trying to use various uiwjs packages in my app that uses Vitest. I ran into this issue where Vitest incorrectly tries to load the cjs version rather than the esm: vitest-dev/vitest#4233
It seems the fix is to simply add exports to the package.json like so:
"exports": {
"require": "./cjs/index.js",
"import": "./esm/index.js"
},
The same applies to react-colour-name. I haven't tried other uiwjs packages but expect they could fall foul of the same issue.
The text was updated successfully, but these errors were encountered:
Hello, I've been trying to use various uiwjs packages in my app that uses Vitest. I ran into this issue where Vitest incorrectly tries to load the cjs version rather than the esm: vitest-dev/vitest#4233
It seems the fix is to simply add exports to the package.json like so:
"exports": {
"require": "./cjs/index.js",
"import": "./esm/index.js"
},
The same applies to react-colour-name. I haven't tried other uiwjs packages but expect they could fall foul of the same issue.
The text was updated successfully, but these errors were encountered: