Observed since 20 Oct, 19:55 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
3xmf-miniapp-generator
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.
| Package / target | Requirement | Relationship |
|---|---|---|
uuidEnvironment{
"local_name": "uuid",
"alias": false,
"peer_metadata": null
} | ^9.0.1 | runtime |
inquirerEnvironment{
"local_name": "inquirer",
"alias": false,
"peer_metadata": null
} | ^8.2.6 | runtime |
Source distribution
{
"shasum": "2aad816fba673009a385417d44d39f9fbbc3bffa",
"tarball": "https://registry.npmjs.org/3xmf-miniapp-generator/-/3xmf-miniapp-generator-1.0.0.tgz",
"fileCount": 3,
"integrity": "sha512-qZGTxZmiI74eYWZHvEzXyHIuMKMkQ2JJOlBQtwTH31DmJqFXvESWy99QcwFilntnxKBISA38R4ua9lBHNlT+sA==",
"signatures": [
{
"sig": "MEUCIA8ttM2SDWmEHmgRxLH1pogbnMUq2Vg5saN9B2lAyDyvAiEA8zXnT3a0xjLD680j3VS2wM+cKGlHA94YlC7QbwSPi60=",
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
}
],
"unpackedSize": 13705
}Observed since 20 Oct, 19:55 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:0f4398215a0c05ab80811d299152dbd006eb310c5788b3f02dcbc2d4417cd745