Nx's shared libs aliases are known in the *.tsx
files but not *.spec.ts
#22645
kasir-barati
started this conversation in
General
Replies: 2 comments
-
How to reproce without my repo?
And you'll see that IDE/VSCode in my case is saying But if you open a |
Beta Was this translation helpful? Give feedback.
0 replies
-
solutionfollowing my former comment on how to use a new nx workspace to reproduce the issue;
REALLY funny and annoying. But I guess it is OK since it is not like that including a bunch of test files in the final app is gonna affect my NextJS app somehow, right? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey devs,
I have a sticky situation with Nx and it is how it treats test files in my monorepo for my NextJS app. I can use aliases to import shared stuff in my frontend app but for some mysterious reasons I cannot get the auto import to work for test files that have
*.ts
extension and not*.tsx
.Yes, you heard me right. It is only about the auto import and VSCode's red lines since I can still run my tests without any problem and
tsc
can compile and run tests.See this file: https://github.com/kasir-barati/you-say/blob/main/apps/frontend/src/shared/api/axios-base-query.api.spec.ts#L3-L7
and here is how it looks in my IDE
tsconfig.spec.json
tsconfig.json
tsconfig.base.json
Any help would be extremely appreciated 😄
Beta Was this translation helpful? Give feedback.
All reactions