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

53
Views
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
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!