base-url replacer aliases vendors when directories monitored in the tsconfig paths have the same name
#148
valeriobelli
started this conversation in
General
Replies: 2 comments 1 reply
|
@valeriobelli this looks like a baseUrl issue. Please check the FAQ #110 question 1. |
1 reply
|
这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi!
I'm unsure if I've found a bug or if it's misconfigured. Let's explain it with an example because it's peculiar.
Given this
tsconfig.json{ "compilerOptions": { "allowJs": false, "baseUrl": ".", "declaration": true, "declarationDir": "typings", "declarationMap": true, "esModuleInterop": true, "isolatedModules": false, "lib": ["esnext"], "module": "esnext", "moduleResolution": "node", "noEmit": true, "outDir": "lib", "paths": { "~/*": ["src/*"] }, "skipLibCheck": true, "strict": true, "target": "es2021", "typeRoots": ["./types", "../../node_modules/@types"], "types": ["jest", "node"] }, "include": ["src", "types"] }the following dependencies in the
package.json{ ..., "dependencies": { "@swc/helpers": ">=0.4.3 <1.0.0", "base64-js": "^1.5.1", "date-fns": "^2.28.0", "invariant": "^2.2.4", }, "devDependencies": { "fp-ts": "^2.12.1", "io-ts": "^2.2.16", "react": "17.0.2", }, "peerDependencies": { "fp-ts": "^2.12.1", "io-ts": "^2.2.16", "react": "17.0.2", }, ... }the following package's folders

and the following file contained in
~/io-ts/applicationContext/index.tsThe replacement ends up with
As you can see, it seems like
tsc-aliasis treating vendors with homonyms folders as aliases.io-tsshould have been resolved to the vendor, and not prefixed with the relative path to theio-tsfolder. I supposebase-urlis where this is happening. Is it due to a misconfiguration, or is it a bug?Let me know if you need some more context.
All reactions