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

feat: add ESM export #307

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

feat: add ESM export #307

wants to merge 3 commits into from

Conversation

jaulz
Copy link

@jaulz jaulz commented May 30, 2022

🎁 Pull Request

  • Used a clear / meaningful title for this pull request
  • Tested the changes in your own code (on your projects)
  • Added / Edited tests to reflect changes (tests folder)
  • Have read the Contributing part of the Readme
  • Passed npm test

Fixes

Right now, if you use vite you will see this error:

ts-toolbelt doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.

See #283

Why have you made changes?

The package is missing an ESM export and this PR will add an empty ESM export so vite does not complain anymore

What changes have you made?

  • created esm.mjs file
  • adapted package.json to export the above mentioned file via module property

What tests have you updated?

n/a

Is there any breaking changes?

  • Yes, I changed the public API & documented it
  • Yes, I changed existing tests
  • No, I added to the public API & documented it
  • No, I added to the existing tests
  • I don't know

Anything else worth mentioning?

n/a

@jaulz jaulz requested a review from millsp as a code owner May 30, 2022 09:12
@Enteleform
Copy link

@millsp +1 for this PR.

vite is one of the most used build tools for modern web frameworks and the warning due to lack of ESM support adds noise to the development & build logs.

Please merge, seems like an easy fix!

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

Successfully merging this pull request may close these issues.

None yet

2 participants