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

setup dynamic remote in v5 federation v2 #815

Open
hosseinmd opened this issue Dec 7, 2024 · 7 comments
Open

setup dynamic remote in v5 federation v2 #815

hosseinmd opened this issue Dec 7, 2024 · 7 comments
Labels
status:new New issue, not reviewed by the team yet. type:bug A bug report.

Comments

@hosseinmd
Copy link
Contributor

Describe the bug

i had a federation config like
remotes: { app1:"app1@dynamic" }
and I set up a resolver to handle chunks address dynamically. Now it's not working with federation v2

System Info

Repack webpack federationV2

Re.Pack Version

5.0.0-rc.2

Reproduction

.

Steps to reproduce

.

@hosseinmd hosseinmd added status:new New issue, not reviewed by the team yet. type:bug A bug report. labels Dec 7, 2024
@jbroma
Copy link
Member

jbroma commented Dec 8, 2024

Hi @hosseinmd,

this type of remote won't be supported with MF2: you can use official way od adding dynamic remotes via registerRemotes documented here: https://module-federation.io/guide/basic/runtime.html#registerremotes

We will update the docs in December to reflect that

@hosseinmd hosseinmd changed the title etup dynamic remote in v5 federation v2 setup dynamic remote in v5 federation v2 Dec 9, 2024
@hosseinmd
Copy link
Contributor Author

hosseinmd commented Dec 9, 2024

When I use registerRemotes or init of MF2 this error happenning

@jbroma
Copy link
Member

jbroma commented Dec 12, 2024

this shouldn't be happening, can you provide a simple repro with this error?

@hosseinmd
Copy link
Contributor Author

https://github.com/callstack/super-app-showcase/
it is working by rspack but not working by webpack.

@jbroma
Copy link
Member

jbroma commented Dec 18, 2024

@hosseinmd yeah, I remember having some issues with webpack, for now please use Rspack to achieve that.

@hosseinmd
Copy link
Contributor Author

Probably it is because getInitializationEntries is removed, have you any replacement?

@jbroma
Copy link
Member

jbroma commented Dec 27, 2024

Probably it is because getInitializationEntries is removed, have you any replacement?

getInitializationEntries was removed for now because it is now handled internally and should work out of the box, I'll investigate and revert this change if needed for the stable release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:new New issue, not reviewed by the team yet. type:bug A bug report.
Projects
None yet
Development

No branches or pull requests

2 participants