-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Closed
Copy link
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code
Description
Hi,
I am using paths to point to another project ( I am using lerna), anyway, I have the following path setup.
"paths": {
"@test/pkg2/*": [
"./packages/pkg2/src/*"
],
The problem is that if I do the following, I get an error saying cannot find module.
import {Something} from "@test/pkg2"; // <<<<<<< This errors HERE HERE
import {TestMe} from '@test/pkg2/item/testme' << This is fine
The above error can be fixed by appending index.ts after the /pkg2, but it should know the default package name is index.ts if not is specified.
I can, of course, change the paths to
"@test/pkg2": [
"./packages/pkg2/src"
],
but now, of course, it complains about not finding testme (see above). The only way I was able to get it to work was by adding both the paths, but is this really correct ?
So, here is what i ended up with, its a lot more code.
"paths": {
"@test/pkg2/*": [
"./packages/pkg2/src/*"
],
"@test/pkg2": [
"./packages/pkg2/src/"
]
}
ctsstc, creage, glemiere, jamesssooi, przbatte and 50 morepvinis, Pinedo11, koiralakiran1, wi-ski, xzilja and 3 more
Metadata
Metadata
Assignees
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code