react-event-listener icon indicating copy to clipboard operation
react-event-listener copied to clipboard

NPM distribution missing ES module build

Open petermikitsh opened this issue 5 years ago • 3 comments

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

petermikitsh avatar Oct 04 '18 01:10 petermikitsh

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.

TrySound avatar Oct 04 '18 08:10 TrySound

Should the module build be removed from the rollup config then?

petermikitsh avatar Oct 04 '18 15:10 petermikitsh

I would leave it for better times.

TrySound avatar Oct 04 '18 15:10 TrySound