Open tom2strobl opened 2 months ago
fuse.js
does it like this, which is quite readable and works nicely:
{
"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"
}
}
}
Hi there,
thanks for the library! I recently upgraded to node 20.x and switched to a
type: "module"
based package.json with typescript. Now when trying tothe code runs, but typescript in VSCode says:
A quick check shows this: https://arethetypeswrong.github.io/?p=icon-gen%405.0.0
As an intermediate workaround one can do this:
but that's not really preferable in the long run.
So it seems like the types are off due to the dual export somehow?