Replies: 1 comment
-
We are currently working on an identical setup and facing the same issue. We can see that is on the roadmap, here. Does this feature have an eta? |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I’m working on a Vite + Module Federation setup with a host and multiple remote applications. Each remote exposes React components, and I’m generating .d.ts files with vite-plugin-dts.
Here’s a simplified version of my setup:
Remote vite.config.ts:
Host vite.config.ts:
Host React usage:
Problem
TypeScript throws the following error in the host project:
Even though each remote builds its own dist/@mf-types/*.d.ts, the host cannot resolve these types automatically.
Constraints
Question
Is there any way to make TypeScript automatically infer remote types in Vite + Module Federation without creating a shared declaration.d.ts or manually copying files, even when tsconfig.paths cannot point outside the repository?
Beta Was this translation helpful? Give feedback.
All reactions