feat: support Type Declerations
Does this support the hotreloading of types mentioned here and if so is there any examples of how to implement it https://module-federation.io/guide/basic/type-prompt.html
Does this have something to do with it not working https://github.com/module-federation/vite/blob/main/src/plugins/pluginMFManifest.ts#L376-L377
react refresh:6 [ dynamic-remote-type-hints-plugin ] err: [object Event] this is also one of the errors on the host side and the remote is using webpack and its manifest has a reference to the .d.ts and zip
Hi @econneely, can you open a PR with a failing scenario in this example pls? With your help we will solve the problem sooner. Thanks
@gioboa that example fails on the host example with this error Failed to resolve entry for package "@module-federation/vite". The package may have incorrect main/module/exports specified in its package.json. [plugin externalize-deps
I ran pnpm install then pnpm run multi-example
I ran pnpm install then pnpm run multi-example
I cloned the repo from scratch and you need to run pnpm run build after the install
Update the readme with that, it fixed it will get the pr up asap
Update the readme with that, it fixed it will get the pr up asap
Fixed, thanks
Hi any timeframe on this want to know for planning some work with a Vite project thanks
I'm on it, I need few days to figure out a solution.
Thanks much appreciated
The idea is to use the @module-federation/dts-plugin because it's always up to date. I'm trying to feed it with a generic compiler. Let's see
The issue title is "Hotreloading Type Declerations" but isn't it so that not even loading once is supported yet (even without hot reload)? Maybe the issue should be renamed to "Support loading Type Declarations (DTS)" or similar?
I would be happy to initially have even a manual way to generate the @mf-types directory (either with build plugin or even a separate command I can run) and hot relaoding could be added later (if that is more complicated than implementing loading once).
@Haprog you are right, I changed the title, thanks.
This Vite integration is run by the community even though is under the module federation org so any help is more than welcome 🤗
Does a branch already exist for this issue?
Not really, I tried something in my local env without pushing anything. You can start form the main branch.
As there's been no activity for 30 days, this issue has been flagged as stale. If you'd like it to remain open, please add a comment within the next 7 days. Thank you.