Skip to content

Conversation

barelyhuman
Copy link
Contributor

@barelyhuman barelyhuman commented Jan 30, 2024

Draft Notes

If we wish to let users know that this is a ESM Package then the current solution should be just fine.

If not then the package needs to export hybrid for both CJS and ESM users.

Closes #179

@barelyhuman barelyhuman marked this pull request as draft January 30, 2024 12:41
@barelyhuman
Copy link
Contributor Author

Additional Notes

Fail Cases

ESM: Fails with unable to import Authentication because of ESM's requirement to have the extension specified.
https://stackblitz.com/edit/stackblitz-starters-yqnavc?file=index.js

CJS: Fails with unable to require ESM module
https://stackblitz.com/edit/stackblitz-starters-cawetc?file=index.js

@barelyhuman barelyhuman self-assigned this Jan 30, 2024
@barelyhuman barelyhuman requested a review from simoneb January 30, 2024 14:05
@barelyhuman barelyhuman marked this pull request as ready for review January 30, 2024 14:07
Copy link
Member

@simoneb simoneb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@barelyhuman barelyhuman merged commit 6d2aaf5 into master Jan 30, 2024
@simoneb simoneb deleted the fix/179-require-of-es-mod branch January 30, 2024 14:57
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.

require() of ES Module not supported
2 participants