[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing types for exports in package.json #424

Open
joshuaavalon opened this issue Jan 4, 2023 · 0 comments
Open

Missing types for exports in package.json #424

joshuaavalon opened this issue Jan 4, 2023 · 0 comments
Assignees
Labels
bug Something isn't working important Should be resolved ASAP

Comments

@joshuaavalon
Copy link

For TypeScript > 4.5, it supports exports in package.json. However, the definition files need to be the same name or types is needed to be defined.

Currently

{
  "exports": {
    ".": {
      "import": "./icons-react/dist/index.esm.js",
      "require": "./icons-react/dist/index.cjs.js"
    },
    "./iconfont/*": "./iconfont/*",
    "./*": [
      "./icons/*",
      "./icons-png/*"
    ]
  }
}

It should be

{
  "exports": {
    ".": {
      "import": "./icons-react/dist/index.esm.js",
      "require": "./icons-react/dist/index.cjs.js",
      "types": "./icons-react/index.d.ts"
    },
    "./iconfont/*": "./iconfont/*",
    "./*": [
      "./icons/*",
      "./icons-png/*"
    ]
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working important Should be resolved ASAP
Projects
None yet
Development

No branches or pull requests

3 participants