timoxley / keycode

Convert between keyboard keycodes and keynames and vice versa.
MIT License
455 stars 62 forks source link

Add esm support #49

Closed TrySound closed 5 years ago

TrySound commented 6 years ago

ES Modules becomes widely used and would be good to provide compatible output. ESM output will allow to remove wrappers in users bundles and as a consequence reduce bundles size.

To make conversion more correct I eliminated default exports in api. Otherwise to prevent collisions rollup would add default field near all named exports. This will make impossible to consume this package by cjs only modules.

Ref https://github.com/webpack/webpack/issues/7973

TrySound commented 6 years ago

/cc @timoxley

TrySound commented 6 years ago

Friendly ping @timoxley

TrySound commented 6 years ago

@timoxley sorry for noise. This package is my transitive dependency. Just want to optimize it.