I'm working on a @nrwl/nx
monorepo. I want to import the folders inside the project src
by the absolute paths. I tried specifying the baseUrl
but didn't work. The only solution worked is, adding the path to the monorepo root tsConfig.json
file as follows.
"paths": {
"*": ["apps/my-app/src/*"]
}
But, the problem is, if I have another project, I will have to add that project as well to this path. I tried something as follows.
"paths": {
"*": ["apps/*/src/*"]
}
But, this doesn't work anymore. It doesn't match the project folder name.
How can I solve this? Or, is there any better way to import by absolute paths?