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

--packages=external option affects local files mapped by tsconfig.json's paths option #3238

Closed
reosablo opened this issue Jul 17, 2023 · 3 comments

Comments

@reosablo
Copy link

When using short hand imports like import foo from "~/foo"; mapped by tsconfig's paths option, it appears that they are treated as external dependencies when the --packages=external option is specified.

// tsconfig.json
{
  "compilerOptions": {
    "paths": {
      "~/*": ["./*"]
    }
  }
}
// entry.js
import foo from "~/foo";

Current output: ~/foo is not resolved as an external dependency. demo

Expected output: ~/foo is resolved. demo (just replaced --packages=external with --external:ext)

https://esbuild.github.io/api/#packages

@evanw
Copy link
Owner

evanw commented Jul 18, 2023

Note to self: Someone has already reported this before, although they closed it: #3160

Edit: And also here: #2792

@reosablo
Copy link
Author

@evanw
I couldn't find that sorry.
I'll close this issue to dedup.

@evanw
Copy link
Owner

evanw commented Jul 18, 2023

The other issues are closed but I need an open one to track this. Reopening this issue.

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

No branches or pull requests

2 participants