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

Repair for correct ESM with TS #668

Closed
adostal opened this issue Aug 26, 2022 · 1 comment
Closed

Repair for correct ESM with TS #668

adostal opened this issue Aug 26, 2022 · 1 comment
Labels

Comments

@adostal
Copy link

adostal commented Aug 26, 2022

Hello, I try switch from CommonJS to ESM Modules.
I have a problem with your library. For proper functioning, it would be necessary to add the types attribute to exports in package.json

Example @casl/ability

From:

"exports": {
    ".": {
      "import": "./dist/es6m/index.mjs",
      "require": "./dist/es6c/index.js"
    }

To:

  "exports": {
    ".": {
      "types": "./dist/types/index.d.ts",
      "import": "./dist/es6m/index.mjs",
      "require": "./dist/es6c/index.js"
    },
@adostal adostal added the bug label Aug 26, 2022
@stalniy
Copy link
Owner

stalniy commented Aug 26, 2022

Can you do PR for all packages?

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

No branches or pull requests

2 participants