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

fix: allow explicit ESM import #84

Merged
merged 7 commits into from
Jun 8, 2024
Merged

fix: allow explicit ESM import #84

merged 7 commits into from
Jun 8, 2024

Conversation

williamhorning
Copy link
Contributor

@williamhorning williamhorning commented Jul 9, 2023

This pull request fixes #83 by updating the build step to add a package.json to the lib/esm directory when building to allow people to explicitly import the ESM version when using something like Deno. It also updates all directory imports, making them explicitly import index.js so they don't throw ERR_UNSUPPORTED_DIR_IMPORT errors. This also fixes the issues fixed by #80.

  • I understand and have followed the contribution guide
  • I have tested my changes locally and they are working as intended (see test.mjs)
  • These changes do not have any notable side effects on other Revolt projects

@williamhorning
Copy link
Contributor Author

@insertish would you please take a look at this when you get the chance?

Copy link
Contributor Author

@williamhorning williamhorning left a comment

Choose a reason for hiding this comment

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

@insertish can you please take a look at this?

@insertish insertish merged commit ced14f1 into revoltchat:master Jun 8, 2024
3 of 5 checks passed
insertish pushed a commit that referenced this pull request Jun 8, 2024
@williamhorning williamhorning deleted the fix-explicit-esm branch June 9, 2024 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

bug: explicitly importing the ESM version fails
2 participants