Skip to content
PluginStats

@antdevx/vite-plugin-hmr-sync weekly downloads statistics

By antdevx · npm · Vite plugins

A Vite plugin for synchronizing HMR across multiple workspaces in a monorepo setup.

View on npm Fresh · Oct 27, 2026 · data Jul 1, 2026

@antdevx/vite-plugin-hmr-sync has 2,726 recorded weekly downloads on npm.

Weekly downloads
2,726
Official API · Jul 1, 2026
7-day growth
—
Insufficient history
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
—
Among tracked npm listings

About @antdevx/vite-plugin-hmr-sync

🔁 @antdevx/vite-plugin-hmr-sync

A minimal and powerful Vite plugin that synchronizes Hot Module Reloading (HMR) across multiple Vite apps — perfect for micro-frontends, monorepos, or Module Federation setups.

When one app rebuilds, others automatically reload in development. No manual refresh, no stale modules.


🧠 Use Case: Micro-Frontend in Dev Mode

You have:

  • A Host App that dynamically loads Remote Apps using Module Federation or import maps.
  • All apps run separately using their own vite dev servers.
  • You want the Host to automatically reload when a Remote rebuilds.

Without this plugin:
You must manually reload the browser to see updates from the remote.

With this plugin:

  1. Remote App uses notifyOnRebuild() to ping the host when it finishes rebuilding.
  2. Host App uses listenForRemoteRebuilds() to receive the ping and trigger a hot reload.

🔥 You stay in sync across apps in development — like magic.


📦 Installation

npm install @antdevx/vite-plugin-hmr-sync --save-dev

🧩 Example Setup

📁 Project Structure
.
├── host-app/
│   └── vite.config.ts
│
└── remote-app/
    └── vite.config.ts

🔌 Host App Setup
// host-app/vite.config.ts
import { defineConfig } from 'vite';
import { listenForRemoteRebuilds } from '@antdevx/vite-plugin-hmr-sync';

export default defineConfig({
  plugins: [
    listenForRemoteRebuilds({
      allowedApps: ['remote-app'],
      endpoint: '/on-child-rebuild',
      hotPayload: { type: 'full-reload', path: '*' },
      onRebuild: (appName) => {
        console.log(`[host-app] 🔁 Triggered by: ${appName}`);
      }
    })
  ],
  server: {
    port: 5173
  }
});

🔔 Remote App Setup
// remote-app/vite.config.ts
import { defineConfig } from 'vite';
import { notifyOnRebuild } from '@antdevx/vite-plugin-hmr-sync';

export default defineConfig({
  plugins: [
    notifyOnRebuild({
      appName: 'remote-app',
      hostUrl: 'http://localhost:5173', // Host app's dev server
      endpoint: '/on-child-rebuild',
      notifyOnSuccessOnly: true
    })
  ],
  server: {
    port: 5174
  }
});

⚙️ API Reference

listenForRemoteRebuilds(options)

Listens for incoming HTTP requests from other apps to trigger HMR.

OptionTypeDefaultDescription
endpointstring'/on-child-rebuild'Path to listen for rebuild requests
allowedAppsstring[]undefinedApps allowed to trigger rebuild
hotPayloadHMRPayload{ type: 'full-reload', path: '*' }HMR payload sent to Vite client
onRebuild(appName, server) => {}undefinedCallback after rebuild
suppressLogsbooleanfalseHide logs

notifyOnRebuild(options | appName)

Notifies a remote server (e.g., host app) after a successful rebuild.

OptionTypeDefaultDescription
appNamestringRequiredName of the app notifying
hostUrlstring'http://127.0.0.1:9000'URL of host to notify
endpointstring'/on-child-rebuild'Path to ping on host
methodstring'GET'HTTP method used
notifyOnSuccessOnlybooleantrueSkip if build fails
suppressLogsbooleanfalseHide logs

📁 Nodemon + HMR Sync Setup

Use startBuildAndServer() to auto-build and serve your app with rebuild notifications.

🔧 nodemon.json Example
{
  "watch": [
    "src",
    "quasar.config.ts"
  ],
  "ext": "js,ts,vue,scss,json",
  "exec": "node -e \"import('@antdevx/vite-plugin-hmr-sync').then(m => m.startBuildAndServer())\"",
  "hmrSync": {
    "port": 5002,
    "notify": true,
    "hostUrl": "http://localhost:5000",
    "appName": "todo-form",
    "buildCommand": "quasar build",
    "serveCommand": "quasar serve"
  }
}
📜 package.json
"scripts": {
  "build:watch": "nodemon"
}

🛠 Available hmrSync / startBuildAndServer() Options

OptionTypeDefaultDescription
notifybooleantrueWhether to notify the host after successful rebuild.
hostUrlstring—The full URL of the host app to notify (e.g. http://localhost:5000).
appNamestring—Name of your app. Used in the query string to identify rebuild origin.
portstring—Port number to serve your local dev preview.
cachestring'0'Time (in seconds) to cache the static files. 0 means no caching.
corsbooleantrueEnable CORS headers for the dev server.
buildCommandstring'quasar build' or 'vite build'Command used to build the app before serving.
serveCommandstring'quasar serve' or 'vite preview'Command used to start the static server after build.

🔗 Workflow Overview

[remote-app] buildEnd() 🔔
      ↓
Sends request to host endpoint `/on-child-rebuild?app=remote-app`
      ↓
[host-app] listens and validates app name
      ↓
Triggers Vite's `server.ws.send(hotPayload)` → 🔁 Full page reload

🥪 Development Tips…

Description from the npm listing.

  • vite
  • vite-plugin
  • hmr
  • hot-module-replacement
  • plugin
  • development
  • live-reload
  • sync
  • monorepo
  • workspace
  • vite-plugin-hmr-sync
  • vite-plugin-hmr
  • micro-frontend
  • vue-module-federation
  • module-federation
  • @antdevx/vite-plugin-hmr-sync

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

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

Adoption over time

@antdevx/vite-plugin-hmr-sync weekly downloads on npm, last 90 days: 2,726 weekly downloads as of Jul 1, 2026.@antdevx/vite-plugin-hmr-syncWeekly downloads on npm · Last 90 days2,726downloads / weekNo observations recorded in this periodno observations · 0 observations · Updated Jul 1, 2026pluginstats.com
@antdevx/vite-plugin-hmr-sync weekly downloads on npm, last 90 days: 2,726 weekly downloads as of Jul 1, 2026.

7/30/90-day growth

@antdevx/vite-plugin-hmr-sync weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.@antdevx/vite-plugin-hmr-syncWeekly downloads growth on npm2,726downloads / week now7-day growthinsufficient historyInsufficient history30-day growthinsufficient historyInsufficient history90-day growthinsufficient historyInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Jul 1, 2026pluginstats.com
@antdevx/vite-plugin-hmr-sync weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

@antdevx/vite-plugin-hmr-sync has no ranking history on npm yet.@antdevx/vite-plugin-hmr-syncnpm ranking · by weekly downloads · Last 90 daysNo ranking observations in this periodno observations · 0 observations · Updated Jul 1, 2026pluginstats.com
@antdevx/vite-plugin-hmr-sync has no ranking history on npm yet.

Listing placement

All npm2,577 listings · 129 pages · 1,290 shown · page 70, #10 (overall #1,390)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins272 listings · 14 pages · page 13, #11 (overall #251)
Vite plugins: every listing in weekly downloads order

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 linear 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 (1)
Recent weekly downloads observations for @antdevx/vite-plugin-hmr-sync
Date (UTC)Weekly downloadsChange vs. previous
2,726—

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/@antdevx/vite-plugin-hmr-sync. First seen Oct 27, 2026; last successful collection Oct 27, 2026. See the methodology.