Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@module-federation/fmr

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@module-federation/fmr

## Installation

  • 0.0.2
  • npm
  • Socket score

Version published
Weekly downloads
12K
increased by29.12%
Maintainers
3
Weekly downloads
 
Created
Source

MF Live Reload Plugin

Installation

  1. Download this package as a dev dependency
> npm i -D @module-federation/fmr
  1. Add the plugin to your webpack plugin configuration
const { ModuleFederationPlugin } = require("webpack").container;

// import the plugin
const { MFLiveReloadPlugin } = require("../plugin/index");

module.exports = {
  //...webpack configs
  plugins: [
    // configure the plugin
    new MFLiveReloadPlugin({
      port: 8081, // the port your app runs on
      container: "dashboard", // the name of your app, must be unique
      standalone: false, // true doesnt work right now
    }),
    new ModuleFederationPlugin({
     // ...module federation configs
    }),
  ],
};
  1. Install the chrome extension Module Federation Live Reload (currently under review)
  2. Start your webpack development server and if everything goes according to plan, you should see this output in your console.
> MF - starting server
> MF - connecting to containers

API

The API for this plugin consists of three configs:

  1. port: this is the port that your application is hosted on
  2. container: this is the name of your Module Federation container
  3. standalone: use this plugin without the MF Dev Tools chrome extension. This config option defaults to true, so if you would like to use the MF Dev Tools chrome extension, you will need to set standalone: false in the MFLiveReloadPlugin config.

Trouble-shooting

Sometimes a browser refresh may be necessary to open a socket connection to the MF Live Reload dev server.

FAQs

Package last updated on 07 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc