zertosh / invariant

invariant
MIT License
1.22k stars 70 forks source link

es module version? #40

Open askbeka opened 5 years ago

askbeka commented 5 years ago

Es modules are supported in 86% of browsers, and this library is used by major web libraries|frameworks.

I have stumbled open this issue while working on experiment in https://next.plnkr.co/edit/8lukaUKTSzv6HOn5

I had to patch invariant with https://next.plnkr.co/edit/8lukaUKTSzv6HOn5?preview=invariant.js

to use export default instead of module.exports at the end.

I suppose a file with called es.js can be created with es export and package.json can have "module": "./es.js" field.