-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
tsconfig baseURL being used to resolve relative paths #3307
Comments
Seconded, I'm also seeing the same behavior. In the simplest case I could find I have:
|
Simplest fix for me is to remove the |
Oh! @BenGladman you're right... I am using {
"baseUrl": "./",
"paths": {
"otherpackage": [ "workspaces/otherpackage/src" ],
"otherpackage/*": [ "workspaces/otherpackage/src/*" ]
}
} Removing it makes both {
"paths": {
"otherpackage": [ "./workspaces/otherpackage/src" ],
"otherpackage/*": [ "./workspaces/otherpackage/src/*" ]
}
} and basically prefixing every Thanks! |
Thanks for the report. I suspect this broke when I attempted to fix #3238 (moving |
This is a recent regression (running esbuild 19)
Minimal reproduction case: https://github.com/BenGladman/esbuild-baseurl-issue
In the reproduction I'm importing from
../hello
, and this should pick up thehello.ts
file in the module's parent directory. But when bundling with esbuild, it is in fact importinghello.json
, which is the file relative to thebaseURL
.tsc
does not do this. And according to the docs,baseURL
should only be used to resolve non-relative imports.The text was updated successfully, but these errors were encountered: