Closed alexandesigner closed 3 weeks ago
Becasue node will auto resolve the localhost to ipv6/ipv4 via your /etc/hosts
configuration . And it not support ipv6 now , so i will auto change the localhost to ipv4.
But it's very strange that you can not access the resource via ipv4, you can try add the config in moduleFederationPlugin :
{remoteIpStrategy:'inherit'}
And what's the app of localhost:3009
? Do you change the host 's port ?
If still not resolve the issue , please provide the env by the cmd npx envinfo --system --binaries --browsers
@2heal1 heeey..
thank you very much for your response!
the solution worked using the { remoteIpStrategy: 'inherit' }
property.
However, based on what I see in the current typings, I believe we could enhance the documentation to explicitly include these configuration options within the plugin. What do you think?
And what's the app of localhost:3009 ? Do you change the host 's port ?
Just me changing the settings to see if it reflected haha
Another problem I'm having is after the build... when I'm running the project, getting a CORS error, i don't know exactly if it's with module federation or in the modernjs project. Why with Garfish (modernjs mfe solution) I also get this error.
I'm running the example without changing anything and when accessing
localhost:3006
the remote applications don't run, the IP is being changed fromlocalhost
to192.168.0.192
.Example link: https://github.com/module-federation/module-federation-examples/tree/master/modernjs-ssr
Reproduce:
Is there any way around this change?