Replies: 1 comment
-
So... The nx tsconfig files in the monorepo were excluding vitest.config.ts, and at the same time not including it either, which meant that the augmentation via the module declaration was not in effect when tsc ran. Moving the module declaration to a separate file I already had with other declarations seems to have resolved this. |
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
-
I am using Remix in an nx monorepo, a pretty much the out-of-the-box experience. I have not manually edited tsconfig files.
I have a route loader that returns an object with a Date in it:
And the Route component:
I have this in
vite.config.ts
:Everything works in VS Code and at run-time, no errors, no typescript complaints.
When I commit, it runs commitlint, which runs the nx typecheck command on the project, and this fails with:
So when tsc is running outside of VS Code it has the wrong type inference for single fetch it seems?
I know tsc is loading the vite.config.ts because if I throw an error in there just to test, it aborts.
I strongly believe this is a problem with the monorepo setup, not Remix itself, but I am at a loss to explain it or how to troubleshoot this further.
So I am hoping for any sort of clue from someone on things I could check.
Usng Remix 2.14.0.
Beta Was this translation helpful? Give feedback.
All reactions