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

Path aliases in declare module "@/xxxx" {} are not automatically resolved #409

Open
3 tasks done
jinyu2022 opened this issue Jan 28, 2025 · 0 comments
Open
3 tasks done

Comments

@jinyu2022
Copy link

Describe the bug

When using path aliases (e.g., @/xxxx) within declare module statements, the dts does not resolve these aliases to their relative paths (e.g., ../../xxxx). Instead, the original alias path is retained in the generated declaration files (.d.ts).

Reproduction

https://stackblitz.com/edit/vitejs-vite-lacghvwp?file=src%2Fcounter.ts

Steps to reproduce

No response

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 11th Gen Intel(R) Core(TM) i5-11400H @ 2.70GHz
    Memory: 3.01 GB / 15.65 GB
  Binaries:
    Node: 20.12.1 - E:\nodejs\node.EXE
    npm: 9.8.1 - E:\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (131.0.2903.99)
    Internet Explorer: 11.0.19041.4355
  npmPackages:
    vite: ^6.0.1 => 6.0.2
    vite-plugin-dts: ^4.5.0 => 4.5.0

Validations

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

1 participant