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

162
Views
¿No se obtuvo remoteEntry.js a pesar de estar definido?

A continuación encontrará webpack.config.js para host/container

 plugins: [ new ModuleFederationPlugin({ name: "host", remotes: { subA: "sub_a@http://localhost:8081/remoteEntry.js", subB: "sub_b@http://localhost:8082/remoteEntry.js", }, }), new HtmlWebpackPlugin({ template: "./public/index.html", }), ],

Como se muestra arriba, he definido subA y subB para que sean dependencias remotas y espero que una vez que se cargue el host, se http://localhost:8081/remoteEntry.js y http://localhost:8082/remoteEntry.js Pero este no es el caso

ingrese la descripción de la imagen aquí

Observación

Supongo que lo anterior podría deberse a nivel de host, no import el código fuente de subA y, por lo tanto, Webpack es lo suficientemente inteligente como para no obtener remoteEntry.js , y si import el código fuente de subA , funciona bien, puedo ver http://localhost:8081/remoteEntry.js siendo obtenido.

Sin embargo, no creo que mi suposición fuera correcta.

En el nivel de host, import el código fuente de subA , y no import el código fuente de subB , sin embargo, también se obtendrá http://localhost:8082/remoteEntry.js ingrese la descripción de la imagen aquí

La imagen de arriba muestra que tanto remoteEntry.js de subA como subB están siendo obtenidos por el host, a pesar de que no import ningún código fuente de subB , el comportamiento me parece que Webpack evita todo el complemento de remotes a nivel de host, o si lo hay de las dependencias remotas que se necesitan, ¿se recuperará remoteEntry.js por completo?

De hecho, espero que la aplicación host obtenga todos los remoteEntry.js que se están definiendo en los remotes , independientemente de si el código fuente se está utilizando o no.

about 4 years ago · Juan Pablo Isaza
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!