onesine / react-tailwindcss-select

Tailwind Select Component for React.js
https://demo-react-tailwindcss-select.vercel.app/
MIT License
183 stars 38 forks source link

Packaging issue with 1.8 (no types) #29

Open timothyarmes opened 1 year ago

timothyarmes commented 1 year ago

Hi,

I just tried installing react-tailwind-select, but it failed due to missing typescript types. Looking at the project inside node_modules I see that there's a nested dist list folder inside of the main dist folder. This sub-folder has the types :

image

I suspected a packaging issue, so I installed version 1.7, and that does indeed have the types in the correct location

onesine commented 1 year ago

Hi @timothyarmes 👋

Thanks for using this package and thanks for this feadback.

I just fixed the problem with the location of the type declaration files. Please update to version 1.8.3.

timothyarmes commented 1 year ago

I'm afraid your fix hasn't worked. Although there's no longer a nest dist folder, the index.d.ts contains:

import Select from "./components/Select";
export default Select;

But ./components does not exist in the distribution:

image

As a result, there are no types defined at all.

Also note that this file still doesn't export SelectProps, Option, etc.

onesine commented 1 year ago

I think everything should be fine now. Can you test and give me your opinion.

timothyarmes commented 1 year ago

Hi.? I've just installed the latest version. I can now import Select and its type definition, but your change to export SelectProps etc. still doesn't work. You can see that dist/index.d.ts only exports the Select type:

import Select from "./components/Select";
export default Select;