vtaits / react-select-async-paginate

Wrapper above react-select that supports pagination on menu scroll
MIT License
303 stars 75 forks source link

`index.d.ts` is not referenced when ESModule is loaded. #150

Closed tictaqqn closed 1 year ago

tictaqqn commented 1 year ago

Are you submitting a bug report or a feature request or a question?

bug report

What is the current behavior?

When running npm install react-select-async-pagenate installed node_modules is like below.

node_modules/react-select-async-paginate
├── README.md
├── dist
│   ├── esm
│   │   ├── index.js
│   │   └── index.js.map
│   ├── index.d.ts
│   ├── index.js
│   └── index.js.map
└── package.json

and in vite project, ES module is referenced and type file index.d.ts is not loaded.

What is the expected behavior?

index.d.ts should be added under dist/esm so that the type file is loaded when ES module is used.

node_modules/react-select-async-paginate
├── README.md
├── dist
│   ├── esm
│   │   ├── index.d.ts # THIS SHOULD BE ADDED
│   │   ├── index.js
│   │   └── index.js.map
│   ├── index.d.ts # Maybe this is not needed.
│   ├── index.js
│   └── index.js.map
└── package.json

Sandbox Link

What's your environment?

react, vite mac "react-dom": "^18.2.0", "react-select-async-paginate": "^0.7.2"

Other information

vtaits commented 1 year ago

Hello. Check please 0.7.3

tictaqqn commented 1 year ago

Thx for your quick handling!