Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle an ESM build of the module #608

Open
alfaproject opened this issue Aug 28, 2021 · 7 comments · May be fixed by #744
Open

Bundle an ESM build of the module #608

alfaproject opened this issue Aug 28, 2021 · 7 comments · May be fixed by #744

Comments

@alfaproject
Copy link

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. (:

@alfaproject alfaproject changed the title Export a ESM build of the module Bundle an ESM build of the module Aug 28, 2021
@Hugo-ter-Doest
Copy link
Collaborator

Hugo-ter-Doest commented Nov 11, 2021

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)?

@christopheragnus
Copy link

I recommend that CommonJS modules should be phased out in favour of ES6 standards... this will allow support into Deno as well.

@xn1cklas
Copy link

Is there an update on this? Struggling to use Natural with Vite and it requires a polyfill to use Natural in the browser.

@bthomas2622
Copy link

Would love to see ES6 support

@Hugo-ter-Doest
Copy link
Collaborator

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)?

And can the two module systems be offered together?

@whaaaley
Copy link

whaaaley commented Jul 3, 2023

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.

@Hugo-ter-Doest
Copy link
Collaborator

Hugo-ter-Doest commented May 28, 2024

See #744 for first concept of ESM build with rollup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants