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

194
Views
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 answers
Answer question

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 Report
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!