hyperweb-io / hyperweb-io/cosmos-kit
Non-index sources does not have proper typings (e.g. `@cosmos-kit/react/main/...`)
- Dominant language
- TypeScript
- Stars
- 201
- Forks
- 159
- PR merge metrics
- No merged PRs in 30d
Description
Seems that most cosmos-kit published packages is using the convention to split CommonJS and ESM sources to separate directories (https://unpkg.com/browse/@cosmos-kit/react@0.26.0/). This results in poor source typings since the path for those typings are in a different directory.
Example edge case related to #106, while `import { SimpleConnectModal } from "@cosmos-kit/react/main/modal/components"` does exist, TypeScript does not detect types because `@cosmos-kit/react/main/modal/components` types are on a different directory at `@cosmos-kit/react/types/modal/components`. The hacky solution is to override module declaration like below:

Proposed solution for this issue is to use `.mjs` extension for ESM sources and merge into single directory, similar to what graz does: https://unpkg.com/browse/graz@0.0.30/dist/

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.