-
Notifications
You must be signed in to change notification settings - Fork 61
Labels
bugIndicates a reported issue or malfunction that needs fixing.Indicates a reported issue or malfunction that needs fixing.
Milestone
Description
Your package has single "types" entry in your package.json, you should have something like:
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./src/index.mts"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./src/index.mts"
}
}
},Also, your typing information is not valid ESM, because it uses relative imports without extensions, so TypeScript ignores those imports. Example of error:
The easiest fix would be to replace custom rollup config with tsup, and adding format: ['esm', 'cjs'], dts: true to tsup config.
mtughan
Metadata
Metadata
Assignees
Labels
bugIndicates a reported issue or malfunction that needs fixing.Indicates a reported issue or malfunction that needs fixing.