Closed LucaMele closed 3 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 .
Fixed in #116
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.