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: update esm module resolver #781

Conversation

yeliex
Copy link
Contributor

@yeliex yeliex commented May 29, 2024

This PR as a continuation of #727 and #767

  1. almost full rewrite the esm resolver, fallback to use node resolver if ts resolve unexpected. this supports js files with d.ts files the same time
  2. trying to guess module format for absolute file import, supports absolute import like mocha

relate: #727 #754 #766 #767 #777

fix #779

@yeliex
Copy link
Contributor Author

yeliex commented May 29, 2024

@Brooooooklyn please take a look

it is better to build a new test tool to test module resolve and import, like what ts-node does. there are so many edge cases for resolvers, and hard to test all cases by a single module.

@yeliex yeliex changed the base branch from master to 05-28-test_integrate-module_add_compiled_.js_file_spec June 3, 2024 02:17
@gastonsilva
Copy link

@yeliex is there an ETA for this or #777 to get into a new release?
I'm stuck with #774 and would like evaluate if I should wait or use a workaround
Thanks!!! (keep the great work ❤️)

@yeliex
Copy link
Contributor Author

yeliex commented Jun 6, 2024

@gastonsilva waiting for @Brooooooklyn to review this, you can try to install from git temporarily, and if there are any issues, i can fix them before release

@martinslota
Copy link

martinslota commented Jun 6, 2024

This also fixes #784! 😍

@Brooooooklyn Brooooooklyn merged commit 91ad893 into swc-project:05-28-test_integrate-module_add_compiled_.js_file_spec Jun 7, 2024
7 checks passed
@yeliex yeliex deleted the fix/ts-extensions branch June 7, 2024 02:54
@yeliex yeliex restored the fix/ts-extensions branch June 28, 2024 06:09
@yeliex
Copy link
Contributor Author

yeliex commented Jun 28, 2024

@Brooooooklyn or maybe we should re-commit this PR to master?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants