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

WIP: Migrate to ESM #716

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

WIP: Migrate to ESM #716

wants to merge 1 commit into from

Conversation

lazerwalker
Copy link
Collaborator

This:

  • Upgrades our TS version for the latest goodness
  • Sets type: module to tell Node that all .js files are ESM
  • Tells TypeScript to emit ESM instead of commonJS

Not currently mergable because Azure Functions doesn't seem to support type: module. A few options:

  1. Write a manual build script to rename all .js files to .mjs, and remove type: module
  2. Use node's default HTTP module instead of node-fetch
  3. Give up on our Discord mod bot integration
  4. Hope I get a better answer internally

@lazerwalker
Copy link
Collaborator Author

No action taken for 2022, Travis downgraded node-fetch.

For future-us, TS 4.7 includes support for mts files that compile down to mjs. Moving all of our files to mts/mjs should allow this to Just Work on Azure Functions.

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.

1 participant