{"id":41896,"library":"rollup-plugin-module-federation","title":"rollup-plugin-module-federation","description":"Rollup plugin enabling Module Federation for Rollup, allowing micro-frontend architectures with shared dependencies and remote entry points. Current stable version 1.11.8, released about 2 months ago, with moderate release cadence. Differentiator: brings Webpack Module Federation concepts to Rollup, targeting Node >= 18, with no known alternatives for Rollup. Provides exposure of `exposes` and `remotes` in Rollup configuration.","status":"active","version":"1.11.8","language":"javascript","source_language":"en","source_url":"https://github.com/MadaraUchiha-314/rollup-plugin-module-federation","tags":["javascript","rollup-plugin","module-federation","rollup","plugin"],"install":[{"cmd":"npm install rollup-plugin-module-federation","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-module-federation","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-module-federation","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is ESM-only since v1; requires Node >= 18.","wrong":"const moduleFederationPlugin = require('rollup-plugin-module-federation')","symbol":"moduleFederationPlugin","correct":"import { moduleFederationPlugin } from 'rollup-plugin-module-federation'"},{"note":"Default export is not available; always use named import. Both `moduleFederationPlugin` and `ModuleFederationPlugin` exist as aliases.","wrong":"import ModuleFederationPlugin from 'rollup-plugin-module-federation'","symbol":"ModuleFederationPlugin","correct":"import { ModuleFederationPlugin } from 'rollup-plugin-module-federation'"},{"note":"There is no default export; this import only works if you are using a bundler or Node ESM that allows default import from a module with only named exports, but it's not recommended.","wrong":"","symbol":"rollup-plugin-module-federation","correct":"import pkg from 'rollup-plugin-module-federation'"}],"quickstart":{"code":"import { moduleFederationPlugin } from 'rollup-plugin-module-federation';\n\nexport default {\n  input: 'src/index.js',\n  plugins: [\n    moduleFederationPlugin({\n      name: 'my_app',\n      filename: 'remoteEntry.js',\n      exposes: {\n        './Button': './src/Button.js',\n      },\n      remotes: {\n        'my_other_app': 'http://localhost:3001/remoteEntry.js',\n      },\n      shared: {\n        react: { singleton: true },\n        'react-dom': { singleton: true },\n      },\n    }),\n  ],\n  output: {\n    dir: 'dist',\n    format: 'esm',\n  },\n};","lang":"javascript","description":"Minimal Rollup configuration with moduleFederationPlugin to expose Button and consume remote from another app, with shared React dependencies."},"warnings":[{"fix":"Upgrade Node.js to version 18 or above.","message":"Package requires Node >= 18.0.0. Older versions will fail with syntax errors.","severity":"breaking","affected_versions":"<18.0.0"},{"fix":"Use import syntax or dynamic import. If using CommonJS, use dynamic import: const plugin = await import('rollup-plugin-module-federation');","message":"ESM-only; CommonJS require() will throw an error.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Always use named import: import { moduleFederationPlugin } from 'rollup-plugin-module-federation';","message":"The plugin supports both 'moduleFederationPlugin' and 'ModuleFederationPlugin' as named exports, but default export is not available.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Review the plugin's documentation for supported options; test remote loading behavior.","message":"The plugin does not support all Webpack Module Federation features; e.g., dynamic loading of remotes may require additional configuration.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.11.8':28 '18':48 '2':31 'ago':33 'allow':13 'altern':52 'architectur':17 'bring':39 'cadenc':37 'concept':43 'configur':63 'current':25 'depend':20 'differenti':38 'enabl':8 'entri':23 'expos':58 'exposur':56 'feder':5,10,42,70 'frontend':16 'javascript':64 'known':51 'micro':15 'micro-frontend':14 'moder':35 'modul':4,9,41,69 'module-feder':68 'month':32 'node':47 'plugin':3,7,67,72 'point':24 'provid':55 'releas':29,36 'remot':22,60 'rollup':2,6,12,45,54,62,66,71 'rollup-plugin':65 'rollup-plugin-module-feder':1 'share':19 'stabl':26 'target':46 'version':27 'webpack':40","created_at":"2026-06-04T18:54:38.147725+00:00","updated_at":"2026-06-04T18:54:38.147725+00:00","problems":[{"fix":"Use import() or switch to Node >= 18 with package.json type: module or use dynamic import.","cause":"Using require() with an ESM-only package in Node < 18 or without --experimental-require-module flag.","error":"ERR_REQUIRE_ESM: require() of ES Module"},{"fix":"Ensure your bundler (e.g., Rollup, webpack) supports the 'exports' field in package.json.","cause":"Webpack-like error when using this plugin with a bundler that doesn't support ESM exports field properly.","error":"Module not found: Default condition should be last one"},{"fix":"Ensure options includes 'name' and at least one of 'exposes' or 'remotes'.","cause":"Missing or misconfigured options object passed to plugin.","error":"TypeError: Cannot read properties of undefined (reading 'exposes')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/MadaraUchiha-314/rollup-plugin-module-federation#readme","github":"https://github.com/MadaraUchiha-314/rollup-plugin-module-federation","docs":null,"changelog":null,"pypi":null,"npm":"rollup-plugin-module-federation","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}