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: native esm support #259

Merged
merged 7 commits into from
Jun 27, 2024
Merged

feat: native esm support #259

merged 7 commits into from
Jun 27, 2024

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Jun 27, 2024

resolves #32 (experimentally!)

This PR:

  • Uses native import() for native ESM modules to bypass jiti when we can
  • Uses a modified version of babel-plugin-transform-modules-commonjs that generates await jitiImport() instead of require() in async contexts
  • Drops JITI_ESM_RESOLVE / esmResolve options as we are using ESM support always

pi0 added 2 commits June 27, 2024 11:13
@pi0 pi0 self-assigned this Jun 27, 2024
@pi0 pi0 merged commit 8924df7 into main Jun 27, 2024
5 checks passed
@pi0 pi0 deleted the feat/native-import2 branch December 17, 2024 21:16
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.

native esm loader with jiti.import
1 participant