Qwik type definitions are not exported in package.json
totto2727 opened this issue · 1 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
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.
Start a new pull request in StackBlitz Codeflow.