revolt.js
revolt.js copied to clipboard
fix: allow explicit ESM import
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.
- [X] I understand and have followed the contribution guide
- [X] I have tested my changes locally and they are working as intended (see
test.mjs) - [X] These changes do not have any notable side effects on other Revolt projects
@insertish would you please take a look at this when you get the chance?