Open askbeka opened 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.
export default
module.exports
I suppose a file with called es.js can be created with es export and package.json can have "module": "./es.js" field.
es.js
package.json
"module": "./es.js"
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 ofmodule.exports
at the end.I suppose a file with called
es.js
can be created with es export andpackage.json
can have"module": "./es.js"
field.