module-federation / vite

Vite Plugin for Module Federation
MIT License
243 stars 17 forks source link

Hotreloading Type Declerations #112

Open econneely opened 3 days ago

econneely commented 3 days ago

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

gioboa commented 3 days ago

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

econneely commented 3 days ago

@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

econneely commented 3 days ago

I ran pnpm install then pnpm run multi-example

gioboa commented 3 days ago

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

econneely commented 3 days ago

Update the readme with that, it fixed it will get the pr up asap

gioboa commented 3 days ago

Update the readme with that, it fixed it will get the pr up asap

Fixed, thanks