Bundle an ESM build of the module
For better tree-shaking and to keep up with latest standards, it would be nice if this package was also published in ESM together with CommonJS for the time being. (:
What does this mean for the current use of export and require statement. Should this be replaced? Is there a way to automate this and make it part of the building process (make it a github action)?
I recommend that CommonJS modules should be phased out in favour of ES6 standards... this will allow support into Deno as well.
Is there an update on this? Struggling to use Natural with Vite and it requires a polyfill to use Natural in the browser.
Would love to see ES6 support
What does this mean for the current use of
exportandrequirestatement. Should this be replaced? Is there a way to automate this and make it part of the building process (make it a github action)?
And can the two module systems be offered together?
I was trying to get this working last night but I think, at least with the current setup in webpack, this isn't possible. Would have to swap to rollup or esbuild (unless I'm missing something). I'd be happy to help out on this. I'm wanting to use this package in Deno Deploy, but it doesn't support npm specifiers atm which is how this package works in Deno at all.
See #744 for first concept of ESM build with rollup.