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

feat(Esm): use gen-esm-wrapper instead of manually making the file #5700

Merged
merged 2 commits into from
Jun 3, 2021

Conversation

vladfrangu
Copy link
Member

Please describe the changes this PR makes and why it should be merged:

One less file to maintain! 🎉

Status and versioning classification:

N/A?

@kyranet
Copy link
Member

kyranet commented Jun 2, 2021

@vladfrangu this needs a rebase.

.gitignore Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@vladfrangu vladfrangu force-pushed the feat/automatic-esm-file-generation branch from 14da0c1 to abdae7e Compare June 2, 2021 18:49
@iCrawl iCrawl merged commit db0d7d4 into master Jun 3, 2021
@iCrawl iCrawl deleted the feat/automatic-esm-file-generation branch June 3, 2021 15:01
@zt64
Copy link

zt64 commented Jun 6, 2021

I don't really understand this too much, but I decided to switch to TypeScript and spent over an hour trying to find why it wouldn't work. Eventually I saw that it had no mjs file and it led me to this PR, then manually running gen-esm-wrapper ./src/index.js ./src/index.mjs fixed it. I don't know if this is supposed to automatically run sometime or I'm just misunderstanding something

@iShibi
Copy link
Contributor

iShibi commented Jun 6, 2021

It runs automatically when the library gets packaged and published to npm. So, you wouldn't have to do this if you install from npm using npm i discord.js@dev

@monbrey
Copy link
Member

monbrey commented Jun 6, 2021

I decided to switch to TypeScript and spent over an hour trying to find why it wouldn't work. Eventually I saw that it had no mjs file

TypeScript doesn't use the .mjs file, it's only for using ES6 syntax in regular JavaScript

@iCrawl iCrawl added this to the Version 13 milestone Jun 27, 2021
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.

8 participants