Hi there!
could you add exports for esm style loading (type: "module" in package.json)
import E2EMailbox from 'e2e-mailbox'
new E2EMailbox()
^ This expression is not constructable.
Type 'typeof import("/<somedir>/node_modules/e2e-mailbox/lib/index")' has no construct signatures.ts(2351)
fuse.js does it like this in their package.json for example:
{
"exports": {
".": {
"types": "./dist/fuse.d.ts",
"import": "./dist/fuse.mjs",
"require": "./dist/fuse.cjs"
},
"./min": {
"types": "./dist/fuse.d.ts",
"import": "./dist/fuse.min.mjs",
"require": "./dist/fuse.min.cjs"
}
}
}
Thanks!
Hi there!
could you add exports for esm style loading (
type: "module"in package.json)fuse.jsdoes it like this in theirpackage.jsonfor example:{ "exports": { ".": { "types": "./dist/fuse.d.ts", "import": "./dist/fuse.mjs", "require": "./dist/fuse.cjs" }, "./min": { "types": "./dist/fuse.d.ts", "import": "./dist/fuse.min.mjs", "require": "./dist/fuse.min.cjs" } } }Thanks!