npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

angular-mfe-helper

v1.0.9

Published

mfehelper ensures your Angular host application runs smoothly even if some microfrontends (MFEs) are offline or unavailable. It prevents crashes by providing a fallback UI when an MFE is down, improving resilience and user experience.

Readme

mfehelper - Microfrontend Helper for Angular Module Federation

mfehelper ensures your Angular host application runs smoothly even if some microfrontends (MFEs) are offline or unavailable. It prevents crashes by providing a fallback UI when an MFE is down, improving resilience and user experience.

🚀 Features

✅ Handles Missing Microfrontends – Prevents crashes when an MFE is unavailable
✅ Provides a Fallback UI – Displays an alternative component instead of breaking the host app
✅ Automatic Remote Check – Dynamically checks if an MFE is running before loading
✅ Easy to Integrate – Works seamlessly with Angular Webpack Module Federation
✅ Minimal Configuration – No need to manually modify Webpack settings

📦 Installation

Using npm:

npm install angular-mfe-helper

Using yarn:

yarn add angular-mfe-helper

🔧 Usage

1️⃣ Wrap Remote Modules with loadRemoteMFE

In your app.routes.ts, use `loadRemoteMFE` to load remote microfrontends dynamically with a fallback UI:

import { ModuleFederationHelper } from 'angular-mfe-helper';
import { Routes } from '@angular/router';

export const routes: Routes = [
  {
    path: 'dashboard',
    loadChildren: () => 
      ModuleFederationHelper.loadRemoteModule({
        remoteEntry: 'http://localhost:4201/remoteEntry.js',
        remoteName: 'mfeDashboard',
        exposedModule: './Module',
      }),
  },
  {
    path: 'analytics',
    loadChildren: () => 
      ModuleFederationHelper.loadRemoteModule({
        remoteEntry: 'http://localhost:4202/remoteEntry.js',
        remoteName: 'mfeAnalytics',
        exposedModule: './Module',
      }),
  },
];

2️⃣ Providing Fallback Components

If an MFE is unavailable, mfehelper will load the provided fallback module instead:

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FallbackComponent } from './fallback.component';

@NgModule({
  declarations: [FallbackComponent],
  imports: [CommonModule],
})
export class FallbackDashboardModule {}

🛠 How It Works

1️⃣ mfehelper first checks if the remote MFE is accessible
2️⃣ If available → Loads the MFE normally
3️⃣ If unavailable → Loads the provided fallback module instead

This prevents runtime errors and allows the host application to function even if some MFEs are offline.

📌 Configuration

You can dynamically load remote modules using ModuleFederationHelper:

ModuleFederationHelper.loadRemoteModule({
  remoteEntry: 'http://localhost:4201/remoteEntry.js',
  remoteName: 'remoteApp',
  exposedModule: './Component'
}).then((component) => {
  console.log('Remote Component Loaded:', component);
});

🎯 Why Use mfehelper?

🚀 Prevents host app crashes when MFEs are missing
💡 Enhances user experience with fallback UI instead of errors
🔧 Reduces manual error handling in Angular Module Federation setups
📈 Scales easily with multiple MFEs

📄 License

MIT License © 2025 Lakshay Bhardwaj

📢 Contact

If you have any issues or queries, feel free to reach out at [email protected]. We will soon make this open source! 🚀" > README.md