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

fix: fix import absolute path support #720

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

yeliex
Copy link
Contributor

@yeliex yeliex commented Aug 4, 2023

currently when import with absolute path, error shows:

node:internal/errors:496
    ErrorCaptureStackTrace(err);
    ^

TypeError [ERR_INVALID_URL]: Invalid URL
    at new NodeError (node:internal/errors:405:5)
    at new URL (node:internal/url:611:13)
    at fileURLToPath (node:internal/url:1399:12)
    at resolve (file:///xxx/node_modules/@swc-node/register/esm/esm.mjs:66:35)
    at nextResolve (node:internal/modules/esm/loader:163:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
    at ESMLoader.import (node:internal/modules/esm/loader:524:22)
    at importModuleDynamically (node:internal/modules/esm/translators:110:35)
    at importModuleDynamicallyCallback (node:internal/process/esm_loader:35:14) {
  input: '/Volumes/test/10_client.ts',
  code: 'ERR_INVALID_URL'
}

@CLAassistant
Copy link

CLAassistant commented Aug 4, 2023

CLA assistant check
All committers have signed the CLA.

@yeliex
Copy link
Contributor Author

yeliex commented Aug 11, 2023

@Brooooooklyn please review again, type bug fixed

@yeliex
Copy link
Contributor Author

yeliex commented Aug 17, 2023

@Brooooooklyn any feedback please
it is two weeks since pr create

if anything need improvement, leave your feedback

@Brooooooklyn Brooooooklyn merged commit fb71e52 into swc-project:master Aug 17, 2023
5 checks passed
@yeliex yeliex deleted the fix/import-absolute branch August 17, 2023 16:02
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.

3 participants