react-event-listener
react-event-listener copied to clipboard
NPM distribution missing ES module build
The rollup config references a module build, however...
https://unpkg.com/[email protected]/dist/react-event-listener.esm.js does not exist https://unpkg.com/[email protected]/dist/react-event-listener.cjs.js exists
This package is used by material-ui which is distributed only with cjs. Webpack is not able to handle a few cases with cjs/esm interop. There is a solution but Oliver doesn't feel good about named exports. https://github.com/oliviertassinari/react-event-listener/pull/79
Default exports suck. I wish they don't exist.
Should the module build be removed from the rollup config then?
I would leave it for better times.