x64Bits / solid-icons

The simplest way to use icons in SolidJS
https://solid-icons.vercel.app
MIT License
284 stars 18 forks source link

Library doesn't work with typescripts 5.0 "bundler" module resolution #29

Closed tobias-walle closed 12 months ago

tobias-walle commented 1 year ago

If I use the new "bundler" moduleResolution in Typescript 5.0 (Beta). I get the following error:

Could not find a declaration file for module 'solid-icons/bi'. '.../node_modules/solid-icons/bi/index.cjs' implicitly has an 'any' type.
There are types at .../node_modules/solid-icons/bi/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'solid-icons' library may need to update its package.json or typings.

3 import { BiRegularTrash, BiRegularEdit } from 'solid-icons/bi';

The problem seems to be that the "types" field is missing in the "exports" field in the generated package.json.

I will create an PR to fix that issue.