Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

55
Views
ModuleFederationPlugin y webpack: ¿Por qué intenté descargar /XXXX/main.js en caso de enrutamiento incorrecto?

Estoy tratando de comprender mejor Webpack y MFE en general. He construido un contenedor de reacción con 2 módulos de reacción. Funciona muy bien hasta ahora. No he terminado de implementar todo el enrutamiento, pero cada vez escribo algo en la URL como:

http://localhost:4230/trainees/add

el navegador intenta buscar nuevos recursos: recuperando main.js

aquí está mi configuración MFE:

        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
                }
            }],
        })

si intento ir a la misma URL usando <Nav>el código, funciona...

¿Es un comportamiento normal?

Gracias

over 2 years ago · Carlos Garzón Colorado
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!