Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

164
Vistas
Sedding props via script tag in a Vue JS app (Micro Front-end)

I have a simple Vue JS project aimed to apply the micro front-end concept. In this context, the project is composed of one parent app (wrapper) and two children's apps, both made in Vue JS. The children's apps are injected by script tag inside its parent - the bundles are stored inside an S3 bucket. I am not using any framework to achieve that, just vanilla JS concepts.

So, it Something like this:

// Parent app - micro front injection (script tags are injected inside document.body)
<script src="micro-front-1-url"></script>
<script src="micro-front21-url"></script>

And finally, inside the parent app template, I have a suitable container for each app where they will be rendered:

// Parent app - template area
<template>
  <div>
   <div id="micro-front-1"></div>
   <div id="micro-front-2"></div>
  </div>
</template>

At this point, everything works fine. My question is, how could I send some props to the children's apps? Would it be possible? I have tried some alternatives, but all of them have failed. I would like to do something as follows:

// Parent app - template area
<template>
  <div>
   <div id="micro-front-1" :someProp="someValue"></div>
   <div id="micro-front-2" :someProp="someValue"></div>
  </div>
</template>

A final thought: As the script tag content is loaded asynchronously, I believe that before passing any prop to the child app, it's necessary to ensure that its content (bundle.js from AWS S3) is in fact loaded.

Thank you all.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda