Observed since 20 Oct, 19:55 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Multi-Framework Micro-Frontend Module Federation - CLI tool to generate micro-frontend apps with Module Federation
Multi-Framework Micro-Frontend Module Federation CLI Tool
A comprehensive CLI tool to generate micro-frontend applications using Webpack Module Federation for React, Vue, and Angular frameworks.
npm install -g 3xmf-miniapp-generator
After installation, you can generate a new micro-frontend app by running:
3xmf-miniapp-generator
The tool will prompt you for:
product_app, cart_app, user_appyour_react_app/
├── public/
│ └── index.html
├── src/
│ ├── App.jsx
│ ├── EventComponent.jsx
│ └── components/
├── helpers/
│ ├── EmbededMicroFrontEnd.jsx
│ ├── eventManager.js
│ └── loadRemoteModule.js
├── webpack/
│ └── webpack.config.js
├── bootstrap.jsx
├── index.jsx
└── package.json
your_vue_app/
├── public/
│ └── index.html
├── src/
│ ├── App.vue
│ └── EventComponent.vue
├── helpers/
│ ├── EmbededMicroFrontEnd.vue
│ ├── eventManager.js
│ └── loadRemoteModule.js
├── webpack/
│ └── webpack.config.js
├── bootstrap.js
├── index.js
└── package.json
your_angular_app/
├── projects/
│ ├── microfrontend-loader/
│ │ └── src/lib/
│ │ ├── components/embedded-microfrontend/
│ │ └── services/remote-loader.service.ts
│ └── event-component/
│ └── src/lib/
│ ├── event-component.component.ts
│ └── event-component.module.ts
├── src/
│ └── app/
├── webpack/
│ └── webpack.config.js
└── angular.json
All generated apps include event-based communication systems that allow microfrontends from different frameworks to communicate with each other using native CustomEvent API.
reactMessage - Events from React microfrontendsvueMessage - Events from Vue microfrontendsangularMessage - Events from Angular microfrontends// Send event from any framework
window.dispatchEvent(new CustomEvent("reactMessage", {
detail: "Hello from React!"
}));
// Listen for events in any framework
window.addEventListener('vueMessage', (event) => {
console.log('Received from Vue:', event.detail);
});
import EmbededMicroFrontEnd from "./helpers/EmbededMicroFrontEnd";
<EmbededMicroFrontEnd
remoteUrl="http://localhost:3001/remoteEntry.js"
scope="remote_app_name"
module="./mount"
/>
<template>
<EmbededMicroFrontEnd
:remoteUrl="'http://localhost:8081/remoteEntry.js'"
:scope="'remote_app_name'"
:module="'./mount'"
/>
</template>
<script>
import EmbededMicroFrontEnd from "./helpers/EmbededMicroFrontEnd.vue";
export default {
components: {
EmbededMicroFrontEnd
}
}
</script>
<app-embedded-microfrontend
[remoteUrl]="'http://localhost:4201/remoteEntry.js'"
[scope]="'remote_app_name'"
[module]="'./mount'"
[type]="'module'">
</app-embedded-microfrontend>
// In your module
import { MicrofrontendLoaderModule } from 'microfrontend-loader';
@NgModule({
imports: [MicrofrontendLoaderModule]
})
export class AppModule {}
// React component importing Vue app
<EmbededMicroFrontEnd
remoteUrl="http://localhost:8080/remoteEntry.js"
scope="vue_product_app"
module="./mount"
/>
<template>
<EmbededMicroFrontEnd
:remoteUrl="'http://localhost:4200/remoteEntry.js'"
:scope="'angular_user_app'"
:module="'./mount'"
/>
</template>
<app-embedded-microfrontend
[remoteUrl]="'http://localhost:3000/remoteEntry.js'"
[scope]="'react_cart_app'"
[module]="'./mount'">
</app-embedded-microfrontend>
remoteUrl: The URL to the remote app's entry point
http://localhost:<port>/remoteEntry.jsscope: The name of the remote app
name field in the remote app's package.jsonproduct_app, cart_app, user_appmodule: The exposed module path
exposes key in the remote app's webpack.config.js"./mount"type (Angular only): The script type for loading the remote
'text/javascript''module'cd your_react_app
npm install
npm start # Runs on port 3000
cd your_vue_app
npm install
npm run serve # Runs on port 8080
cd your_angular_app
npm install
ng build microfrontend-loader # Microfrontend Loader component is extracted as seperate library
ng serve # Runs on port 4200
npm loginnpm publishISC
Download counts and popularity will appear here as the collector receives them.
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 19:55 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:d70402a0d569a82f4577438bde8f339141338b32701267ba9851c637201e4b4d