Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotreloading Type Declerations #112

Open
econneely opened this issue Sep 26, 2024 · 10 comments
Open

Hotreloading Type Declerations #112

econneely opened this issue Sep 26, 2024 · 10 comments
Labels
enhancement New feature or request

Comments

@econneely
Copy link

econneely commented Sep 26, 2024

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
Copy link
Collaborator

gioboa commented Sep 26, 2024

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 gioboa added the enhancement New feature or request label Sep 26, 2024
@econneely
Copy link
Author

@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
Copy link
Author

I ran pnpm install then pnpm run multi-example

@gioboa
Copy link
Collaborator

gioboa commented Sep 26, 2024

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
Copy link
Author

econneely commented Sep 26, 2024

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

@gioboa
Copy link
Collaborator

gioboa commented Sep 26, 2024

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

Fixed, thanks

@econneely
Copy link
Author

Hi any timeframe on this want to know for planning some work with a Vite project thanks

@gioboa
Copy link
Collaborator

gioboa commented Oct 2, 2024

I'm on it, I need few days to figure out a solution.

@econneely
Copy link
Author

Thanks much appreciated

@gioboa
Copy link
Collaborator

gioboa commented Oct 2, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants