Description
Hello,
please add an additional ES module build. The source code is already almost an ES module, the two incompatibilities are imports not pointing at files (with file extensions) and using class fields.
Class fields are more or less final and can be left alone so the only change necessary for src/
to be an ES module are the imports. I tried rewriting them which works fine in Node v13 and higher but breaks all the tests because jest does not support it jet. They're working on it though.
In the meantime I suggest adding a third babel build using no preset and an additional plugin: ["@pika/babel-plugin-esm-import-rewrite", {addExtensions: true}]
. Also pointing the module
field to the new build in package.json
.
Are you open to this? And if so do you want a pull request implementing this?
BTW this is a great library and especially the documentation is fantastic