Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

60
Visualizações
ModuleFederationPlugin and webpack: Why did I try to download /XXXX/main.js in case of incorrect routing?

I'm trying to better understand Webpack and MFE in general. I have built a react container with 2 react modules. It works very well so far. I haven't finished implementing all the routing, but every time I write something in the URL like:

http://localhost:4230/trainees/add

The browser tries to search for new resources: recovering main.js

here is my MFE configuration:

 new ModuleFederationPlugin( {
 name : 'container',
 remotes : {
 trainer : 'trainer@http://localhost:4230/remoteEntry.js',
 trainee : 'trainee@http://localhost:4220/remoteEntry.js'
 },
 shared: ['react', 'react-dom', {
 'react-router-dom': {
 singleton: true
 }
 }],
 })

If I try to go to the same URL using <Nav> the code, it works...

Is it normal behavior?

Thank you

over 2 years ago · Carlos Garzón Colorado
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda