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

157
Visualizações
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 à 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