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

Support path aliases #2518

Open
sodic opened this issue Feb 17, 2025 · 0 comments
Open

Support path aliases #2518

sodic opened this issue Feb 17, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@sodic
Copy link
Contributor

sodic commented Feb 17, 2025

Reported in version 0.16.2

Allow users to define path aliases in their tsconfig.json files, For example:

{
  "compilerOptions": {
    "paths": {
      "@/*": ["src/*"],
      "@components/*": ["src/components/*"]
    }
  }
}

This is useful becuase:

  • Other libraries rely on it (e.g., ShadCN).
  • Users don't need to write imports as import { MyComponent } from "../../../../../../../../components"; and change them in many places whenever a files moves.

I have attempted this here: #2457
I'll edit the description to properly explain the problems. Until then, use this PR as the source of truth.
Thanks for mentioining this, @JakeLo123!

@sodic sodic added the enhancement New feature or request label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant