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

188
Vistas
How to show react and angular on same page using micro-frontend Runtime integration approach?

I have my main (parent) app written in Angular. Now I want to use a react component inside the parent app using the micro-frontend approach, But I want it to be Runtime integration.

for example, the Header of my application is in Angular. Now I want that footer should be in react but should be deployed on the server other than the parent app. I want this integration on the run-time.

How can I achieve this architecture?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Module-federation microfronted architecture is recommended.

You should have a single container(parent) app with webpack.config.js like this:

const HtmlWebpackPlugin = require('html-webpack-plugin');
const ModuleFederationPlugin = 
require('webpack/lib/container/ModuleFederationPlugin');

module.exports = {
  mode: 'development',
  devServer: {
    port: 8080,
  },
  plugins: [
    new ModuleFederationPlugin({
      name: 'container',
      remotes: {
        Header: 'header@http://localhost:8081/remoteEntry.js',
        Footer: 'footer@http://localhost:8082/remoteEntry.js',
      },
    }),
    new HtmlWebpackPlugin({
      template: './public/index.html',
    }),
  ],
};

and separate footer and header components as a remoteEntry project, each component includes webpack.config.js file like this:

const HtmlWebpackPlugin = require('html-webpack-plugin');
const ModuleFederationPlugin = 
require('webpack/lib/container/ModuleFederationPlugin');

module.exports = {
  mode: 'development',
  devServer: {
    port: 8081,
  },
  plugins: [
    new ModuleFederationPlugin({
      name: 'header',
      filename: 'remoteEntry.js',
      exposes: {
        './Header': './src/index',
      },
    }),
    new HtmlWebpackPlugin({
      template: './public/index.html',
    }),
  ],
};

and import the header in this way:

import Header from 'Header/header'

run these projects with webpack serve

you can develop each remote component with angular, react or ... because after build we have compiled and pure js files

clone this repo: https://github.com/rzghorbani72/microfrontend-modulefedefation/tree/master/mf-project-1

over 4 years ago · Santiago Trujillo Denunciar
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