unplugin / unplugin-icons

🤹 Access thousands of icons as components on-demand universally.

Home Page:https://www.npmjs.com/package/unplugin-icons

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Qwik type definitions are not exported in package.json

totto2727 opened this issue · comments

Describe the bug

I searched Qwik and confirmed that there is no corresponding Issue.

Currently, there is no export of the Qwik type definition file in package.json.
This causes an error when configuring tsconfig.json according to the documentation, as it does not recognize the type definition file.

". /node_modules/unplugin-icons/types/qwik" will work properly, so it is almost certainly a misconfiguration in package.json.

If you add the following to the exports field in package.json, it should work correctly with the configuration as documented.

    "./types/qwik": {
      "types": "./types/qwik.d.ts"
    }

Issue before submitting the PR.

Should I submit a PR on my end?

Rerated PR

https://github.com/unplugin/unplugin-icons/pull/262/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519

Reproduction

https://stackblitz.com/edit/vitejs-vite-uv7rug?file=package.json

System Info

❯ npm run build

> vite-qwik@0.0.0 build
> tsc && vite build

error TS2688: Cannot find type definition file for 'unplugin-icons/types/qwik'.
  The file is in the program because:
    Entry point of type library 'unplugin-icons/types/qwik' specified in compilerOptions

  tsconfig.json:24:15
    24     "types": ["unplugin-icons/types/qwik"]
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    File is entry point of type library specified here.


Found 1 error.

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.