-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Typescript path alias not resolved in emited declarations #25
Comments
Path alias will not be resolved even if you're using native |
Interesting, I just tried with tsc and indeed the same is happening, do you know why? The declarations for packages that consume them are invalid. |
Essentially, this issue faces the same problem as #23; dts packaging cannot leverage rollup/esbuild's own path resolver/rewriter. I haven't thought of a good solution yet 🤔 |
Gotcha, thanks for your review on #23.
With the typescript plugin the declaration were emitted in the original folder (relative to the module root) so they were not included inside the folder with the To better explain what I'm talking about I created a small example here:
Maybe the typescript plugin approach could be used to solve both these issues. Probably you are already aware of all this, but I just want to help with the little I know so far 😅 |
Describe the bug
Hi, I am integrating this plugin and found out that the typescript path alias are not resolved in the emited declarations.
If in your code you write
with the following ts paths config
The .d.ts file as the same output
What I would be expecting is that the path is resolved to produce a valid declaration file like this
The result is that the emited declarations are not working in packages importing them as they don't know how to resolve the paths alias.
Reproduction
https://codesandbox.io/p/devbox/issue-isolated-declarations-paths-39pdg8
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: