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

Aliasing root directory is not working #217

Open
dvqc opened this issue May 9, 2024 · 2 comments
Open

Aliasing root directory is not working #217

dvqc opened this issue May 9, 2024 · 2 comments

Comments

@dvqc
Copy link
Contributor

dvqc commented May 9, 2024

tsc-alias is not resolving aliased root directory defined in tsconfig.json paths parameter. I tried different versions of typescript and tsc-alias and it didn't work.

tsconfig.json :

{
    "compilerOptions": {
        "target": "es6",
        "module": "commonjs",
        "outDir": "./build",
        "strict": true,
        "esModuleInterop": true,
        "skipLibCheck": true,
        "isolatedModules": true,
        "forceConsistentCasingInFileNames": true,
        "moduleResolution": "node",
        "baseUrl": ".",
        "paths": {
            "#/*": [
                "./*"
            ]
        }
    },
    "tsc-alias": {
        "resolveFullPaths": true,
        "verbose": false
    },
    "exclude": [
        "node_modules",
        "build"
    ]
}
@lozyue
Copy link

lozyue commented May 12, 2024

I was in trouble as the same. After 1 hour trying, I solved it by simplely removing the "tsc-alias" config in tsconfig.json. It seem that when this config added, tsc-alias will jump all of the files. What an odd behavior!

@dvqc
Copy link
Contributor Author

dvqc commented May 13, 2024

I was in trouble as the same. After 1 hour trying, I solved it by simplely removing the "tsc-alias" config in tsconfig.json. It seem that when this config added, tsc-alias will jump all of the files. What an odd behavior!

@lozyue I tried removing tsc-alias from tsconfig as you mentioned but still got unresolved paths when compiling.

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

No branches or pull requests

2 participants