Zero Dependencies
No external libraries. Tree-shakable bundles with optimal size. Uses only native browser APIs.
Zero dependencies, MQTT-style wildcards, production-ready
import { createPubSub } from '@belyas/pubsub-mfe';
// Create a bus instance
const bus = createPubSub({ app: 'my-app' });
// Subscribe with wildcards
bus.subscribe('cart.#', (msg) => {
console.log('Cart event:', msg.topic, msg.payload);
});
// Publish messages
bus.publish('cart.item.add', { sku: 'ABC123', qty: 1 });
bus.publish('cart.checkout', { total: 99.99 });Built specifically for microfrontend architectures, PubSub MFE solves common communication challenges:
Architecture: Core bus with pluggable adapters
New to PubSub MFE?
Start with the Getting Started Guide to learn the basics.
Looking for specific features?
Check out the Core Concepts to understand the architecture.
Migrating from another solution?
See Best Practices for migration patterns.