Getting path aliases from tsconfig to work #734
Unanswered
Nikola-Milovic
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone, I made a small reproducible monorepo to showcase the issue I am facing. I am using
tsup
to bundle my internal packages. I have an UI package that is shared, and I use path aliases for this package, but when I do so it fails everytime with[ERROR] Could not resolve "@company/frontend-shared/utils/random"
This is the repo and a small readme
I had a lot of issues with this monorepo, this is my 5th or 6th iteration and it seems to be working correctly. Using relative paths works, but using the path aliases inherited from the base tsconfig doesn't work
The project is using PNPM workspaces
EDIT:
I managed to hack together a solution in terms of a plugin
It doesn't work with
-dts
flag,And there is issue with file names, I have to hardcode the filetype as such
fullPath = input[alias] + "/" + rest + ".ts";
, otherwise it cannot find the fileAny improvements are welcomed but this seems more esbuild related than tsup
Beta Was this translation helpful? Give feedback.
All reactions