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

ESM build? #63

Open
edemaine opened this issue Jul 21, 2023 · 1 comment · May be fixed by #64
Open

ESM build? #63

edemaine opened this issue Jul 21, 2023 · 1 comment · May be fixed by #64

Comments

@edemaine
Copy link

Is your feature request related to a problem? Please describe.
When including attr-accept in an ESM library, Vite fails to properly convert from CJS to ESM. See soorria/solid-dropzone#3 for a real-world example.

Describe the solution you'd like
Offer an ESM build parallel to the current CJS options. I believe a larger Webpack configuration can do this relatively easily.

Describe alternatives you've considered
Forking just to produce our own ESM build.

@okonet
Copy link
Collaborator

okonet commented Jul 21, 2023

Feel free to submit a PR. I have no idea how to do this.

edemaine added a commit to edemaine/attr-accept that referenced this issue Jul 21, 2023
Replace old `dist/es/index.js` with `dist/index.mjs` that uses ESM
syntax, and properly link to it via `module` and `exports`.

Fixes react-dropzone#63
@edemaine edemaine linked a pull request Jul 21, 2023 that will close this issue
12 tasks
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.

2 participants