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

Expose new functions in ESM wrapper #99

Merged
merged 1 commit into from
Mar 25, 2023

Conversation

blutorange
Copy link
Collaborator

Some time ago coloris added the new functions setInstance, removeInstance, and updatePosition. We also added them in the type definitions. But attempting to use those functions when importing from the ESM modules gives the following error:

✘ [ERROR] No matching export in "../../.yarn/cache/@melloware-coloris-patch-884dd6decc-cd6a043de1.zip/node_modules/@melloware/coloris/dist/esm/coloris.js" for import "setInstance"
✘ [ERROR] No matching export in "../../.yarn/cache/@melloware-coloris-patch-884dd6decc-cd6a043de1.zip/node_modules/@melloware/coloris/dist/esm/coloris.js" for import "removeInstance"
✘ [ERROR] No matching export in "../../.yarn/cache/@melloware-coloris-patch-884dd6decc-cd6a043de1.zip/node_modules/@melloware/coloris/dist/esm/coloris.js" for import "updatePosition"

ESM requires all exports to be named explicitly, so they need to be added to the esm-wrapper.js

Some time ago coloris added the new functions `setInstance`, `removeInstance`, and `updatePosition`. We also added them in the type definitions. But attempting to use those functions when importing from the ESM modules gives the following error:

```
✘ [ERROR] No matching export in "../../.yarn/cache/@melloware-coloris-patch-884dd6decc-cd6a043de1.zip/node_modules/@melloware/coloris/dist/esm/coloris.js" for import "setInstance"
✘ [ERROR] No matching export in "../../.yarn/cache/@melloware-coloris-patch-884dd6decc-cd6a043de1.zip/node_modules/@melloware/coloris/dist/esm/coloris.js" for import "removeInstance"
✘ [ERROR] No matching export in "../../.yarn/cache/@melloware-coloris-patch-884dd6decc-cd6a043de1.zip/node_modules/@melloware/coloris/dist/esm/coloris.js" for import "updatePosition"
```

ESM requires all exports to be named explicitly, so they need to be added to the esm-wrapper.js
@melloware melloware merged commit 4cc5837 into main Mar 25, 2023
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