这是indexloc提供的服务,不要输入任何密码
Skip to content

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.

2 participants