tbleckert / react-select-search

⚡️ Lightweight select component for React
https://react-select-search.com
MIT License
676 stars 147 forks source link

Build artefact does not export as a traditional ESM #96

Closed LucaMele closed 3 years ago

LucaMele commented 4 years ago

When installing this as a dependency, I noticed that there is ES6 code in the dist build (for example: const, =>, let, etc). I suggest to export as a traditional ESM Module (ES5 code + import/export) or explicitly declare that this is not compatible with IE11. Most of the NPM Modules in the community use this approach. If not done in this way, in IE11 it won't work out of the box and a consumer has to transpile it.

Screenshot 2020-06-30 at 15 20 38
tbleckert commented 4 years ago

Yeah, should probably mention it in the readme. The esm build is targeted at modern browsers, if you need to support older ones you can use the cjs build. We're specifically excluding IE11 in the esm build https://github.com/tbleckert/react-select-search/blob/master/babel.config.esm.js#L9 .

tbleckert commented 3 years ago

Fixed in #116