-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Regression in v0.19 when using relative imports and paths from tsconfig #3354
Comments
I have resolved this issue by adding an explicit path aliases for relative imports, but this seems like a pretty strange workaround: {
"compilerOptions": {
"baseUrl": ".",
"paths": {
".": ["."],
"./*": ["./*"],
"*": ["web/*"]
}
}
} |
Same issue, and @andyvanee's workaround also worked for me - thanks for posting this. |
Seeing a similar issue. Doesn't seem to be exactly the same context, but may have the same root cause. For us, it's manifesting as our build missing an export from package in the same monorepo as an application. Reverting to 0.18.20 works for us. We haven't tried @andyvanee's workaround of adding explicit relative import paths yet. Will report back if we try that. |
We seem to have a similar issues, import paths (non-relative) which are set up as aliases through |
There was an update with a fix for the resolution behaviour in v0.19.1, you can retry the work-around with that version. |
I tried both 0.19.1 and 0.19.2, having the same issue |
Same here. 0.19.0-0.19.2 reproduce our issue. We haven't tried 0.19.3 yet. |
Without seeing a reproduction case, I'm not sure if @ilijapuaca is having the same issue, but you can see from my original reproduction that none of the The expected output should be two function definitions as it is in // web/bar/foo/foo.ts
function foo() {
console.log("bar/foo");
}
// web/foo.ts
function foo2() {
console.log("web/foo");
foo();
}
// entry.ts
foo2(); While the actual output from // web/foo.ts
function foo() {
console.log("web/foo");
foo();
}
// entry.ts
foo(); |
Note that I was only referring to the work-around needing 0.19.1 (for me at least). The issue still remains. |
Possibly related, we had to change |
I believe this may be related to other issues, but haven't seen a minimal reproduction expressed elsewhere:
Expected output - v0.18.20 processes relative import correctly
Regression - v0.19 resolves the relative import incorrectly
The most relevant pieces to this reproduction are:
compilerOptions.paths
The output in
v0.19
translates the example into a recursive function sinceweb/bar/foo/index.ts
is masked byweb/foo.ts
--packages=external
option affects local files mapped bytsconfig.json
'spaths
option #3238The text was updated successfully, but these errors were encountered: