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
The package.json file contains esm exports without using the "type": "module" key.
This behavior breaks bundlers like vitest due to the misleading package.json format.
What did you expect to happen?
The switch from commonjs to esm should grant that the consumers (bundlers, compilers...) will receive a specs compliant package.json file.
What happened actually?
Error displayed in vitest
Module /node_modules/react-content-loader/dist/react-content-loader.es.js:1 seems to be an ES Module but shipped in a CommonJS package. You might want to create an issue to the package "react-content-loader" asking them to ship
the file in .mjs extension or add "type": "module" in their package.json.
As a temporary workaround you can try to inline the package by updating your config:
// vitest.config.js
export default {
test: {
server: {
deps: {
inline: [
"react-content-loader"
]
}
}
}
}
Which versions of react-content-loader, and which browser are affected by this issue?
What did you do?
The
package.json
file contains esm exports without using the "type": "module" key.This behavior breaks bundlers like vitest due to the misleading package.json format.
What did you expect to happen?
The switch from commonjs to esm should grant that the consumers (bundlers, compilers...) will receive a specs compliant package.json file.
What happened actually?
Error displayed in vitest
Which versions of react-content-loader, and which browser are affected by this issue?
[email protected]
Please let me know if you need a demo project to replicate the issue 🙏
The text was updated successfully, but these errors were encountered: