Closed Kimbo0o closed 1 year ago
The package.json should state
"type": "commonjs"
or theindex.json
file should be ESM Syntax
Adding exports
field to package.json
with the correct entry points might also help. And don't forget to use different extensions for CJS/ESM.
Sounds great. We want to use cjs
for CommonJS files.
Happy to take a contribution that fixes this.
Describe the Bug
The package.json file specifies
"type": "module"
, but entry point uses commonjs (require Syntax). This causes errors when you try to test with vitest, see also: https://github.com/vitest-dev/vitest/issues/4007#issuecomment-1691096627Steps to Reproduce
package.json
index.json
https://www.npmjs.com/package/feelin?activeTab=codeExpected Behavior
The package.json should state
"type": "commonjs"
or theindex.json
file should be ESM Syntax. See also: https://nodejs.org/api/packages.htmlEnvironment