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: compat node module commonjs interop #56

Merged
merged 8 commits into from
Oct 18, 2023
Merged

feat: compat node module commonjs interop #56

merged 8 commits into from
Oct 18, 2023

Conversation

underfin
Copy link
Contributor

@underfin underfin commented Oct 15, 2023

Description

close #55

Why need this, please refer to #55. Because we follow esbuild implemention, the pr implement has two parts.

  • detect ModuleType at resolver
  • If importer module is ".mjs" or "type:module" at package.json, codegen result will render to __toEsm(xx, 1/*node mode*/)

Test Plan

Added.


@hyf0 hyf0 mentioned this pull request Oct 15, 2023
@underfin underfin changed the title wip: compat node module commonjs interop feat: compat node module commonjs interop Oct 17, 2023
@underfin underfin merged commit 58c2786 into main Oct 18, 2023
4 checks passed
@underfin underfin deleted the node_type branch October 18, 2023 05:49
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.

esm & cjs interop support node.js compat
2 participants