Skip to content

I presume, using package relative type aliases in tsconfig is out of the question - would there be any way of solving this? #322

Answered by NiGhTTraX
ekr3peeK asked this question in Q&A
Discussion options

You must be logged in to vote

Pasting from #348:

It goes beyond the scope of this project, which is providing a good DX for navigating between packages in a monorepo. Using aliases inside a package can improve the DX for that package specifically (by shortening imports), but it will have downstream effects, by forcing the consumers to duplicate the aliases (or hoisting them in the root). The same would apply if a package imported non-TS files e.g. .png. The package in question would need a type declaration for *.png and all its consumers would have to contain it as well.

Please look at the existing example in apps/cra which defines a local alias. I've also created a proof of concept here for using a local alias inside

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by NiGhTTraX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants