Skip to content
PluginStats

vitest-plugin-module-federation weekly downloads statistics

By chrisboakes · npm · Testing

Auto-mock Module Federation remote imports in Vitest — no more unresolvable 'remoteApp/Component' imports in unit tests.

View on npm Fresh · Oct 17, 2026

vitest-plugin-module-federation has 0 recorded weekly downloads on npm, a decrease of 100% over the past 30 days.

It ranks #2251 of 2,256 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by -100%.

PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.

Weekly downloads
0
Official API · Oct 17, 2026
7-day growth
-100%
-1 weekly downloads
30-day growth
-100%
-14 weekly downloads
90-day growth
-100%
-13 weekly downloads
Rank
#2251
Among tracked npm listings

About vitest-plugin-module-federation

Vitest Plugin Module Federation

[![CI][ci-badge]][ci-link] [![npm version][npm-badge-version]][npm-link]

Vitest plugin to auto-mock Module Federation remote imports in unit tests.

The Problem

If your app consumes federated remotes, imports like shop/Button only exist at runtime:

The usual fix is a vi.mock('shop/Button', ...) in every test file that touches a remote. That gets old quickly.

The Solution

Register the plugin once and tell it which remotes you have:

Anything imported from shop/* or checkout/* now resolves to a generated mock. By default that's a React component which renders its props and children with a predictable test id:

No vi.mock calls and no changes to your components.

Requirements

• Node.js >= 20 • Vitest 2, 3 or 4 (it's a plain Vite plugin, so any Vite-based runner works)

Installation

pnpm

npm

Usage

Telling the plugin about your remotes

Pass remote names directly, a RegExp, or reuse the federation config you already have. At least one of remotes or federationConfig is required and they merge when both are given:

Choosing the default mock

defaultMock controls what gets generated for a matched import:

• 'react-component' (the default) renders -" {...props}>{children}

. It's exported as default and as a PascalCased named export derived from the module path, so shop/user-profile also exports UserProfile. Note react needs to be installed; it isn't a dependency of this plugin. • 'empty' gives you export default {} with no React involved. • A function gives you full control and should return the module source:

Overriding individual modules

Sometimes a generated component isn't enough, for example a remote that exports utilities. Use mocks to override specific imports:

TypeScript

Your app probably declares its remote modules already. If not:

How it works

The plugin runs before Vite's own resolver (enforce: 'pre') and matches import specifiers against your remote names. Matches resolve to a virtual module (or to your file override) and the mock source is generated at load time. Because the interception happens at the resolver level, it makes no difference which bundler builds the app itself.

Credits

MIT © Chris Boakes

Description from the npm listing.

  • vitest
  • vitest-plugin
  • vite-plugin
  • module-federation
  • microfrontend
  • mock
  • testing

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

vitest-plugin-module-federation weekly downloads on npm, last 90 days: 0 weekly downloads as of Oct 17, 2026, -100% over 90 days.vitest-plugin-module-federationWeekly downloads on npm · Last 90 days0downloads / week-100% over 90 days024681012141618Jul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 21, 2026 – Oct 17, 2026 · 89 observations · Updated Oc…pluginstats.com
vitest-plugin-module-federation weekly downloads on npm, last 90 days: 0 weekly downloads as of Oct 17, 2026, -100% over 90 days.
PNG SVG

7/30/90-day growth

vitest-plugin-module-federation weekly downloads growth on npm: -100% over 7 days, -100% over 30 days, -100% over 90 days.vitest-plugin-module-federationWeekly downloads growth on npm0downloads / week now7-day growth-1 weekly downloads-100%30-day growth-14 weekly downloads-100%90-day growth-13 weekly downloads-100%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
vitest-plugin-module-federation weekly downloads growth on npm: -100% over 7 days, -100% over 30 days, -100% over 90 days.
PNG SVG

Ranking history

vitest-plugin-module-federation npm ranking history: currently #2251 (by weekly downloads).vitest-plugin-module-federationnpm ranking · by weekly downloads · Last 90 days#2251current rank#2244#2246#2248#2250#2252#2254Jul 21Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19rankOct 18, 2026 – Oct 19, 2026 · 2 observations · Updated Oct 17, 2026pluginstats.com
vitest-plugin-module-federation npm ranking history: currently #2251 (by weekly downloads).
PNG SVG

Listing placement

All npm2,256 listings · 113 pages · 1,130 shown · page 113, #12 (overall #2,252)
All npm: every listing in weekly downloads order
PNG SVG

Listing placement

Testing21 listings · 2 pages · page 1, #20 (overall #20)
Testing: every listing in weekly downloads order
PNG SVG

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (121)
Recent weekly downloads observations for vitest-plugin-module-federation
Date (UTC)Weekly downloadsChange vs. previous
0-1
10
10
10
10
10
10
1-1
2-1
30
3-1
40
40
4—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/vitest-plugin-module-federation. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.