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

ESM #129

Merged
merged 2 commits into from
Oct 2, 2024
Merged

ESM #129

merged 2 commits into from
Oct 2, 2024

Conversation

airhorns
Copy link
Contributor

@airhorns airhorns commented Sep 28, 2024

This updates wds to allow transpiling code that is truly import'd instead of just code that is require'd. Node's extension mechanisms for imports are totally different than those for requires, and are different in all sorts of subtle and huge ways. This implements the ESM customization hooks to:

  • allow resolving .js imports as .ts files
  • compiling .ts files into that .js source using the existing compiler infrastructure.

See https://nodejs.org/api/module.html#customization-hooks for more info on the hooks

@airhorns airhorns force-pushed the esm-support-2 branch 3 times, most recently from b9a00de to b65d056 Compare September 28, 2024 18:50
@airhorns airhorns merged commit 44cf02b into main Oct 2, 2024
2 checks passed
@airhorns airhorns deleted the esm-support-2 branch October 2, 2024 22:03
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