Skip to content
PluginStats

vite-plugin-restart weekly downloads statistics

By antfu (15 listings) · npm · Vite plugins

Custom files/globs to restart Vite server

View on npm Fresh · Dec 6, 2026

vite-plugin-restart has 58,121 recorded weekly downloads on npm, an increase of 14.8% over the past 30 days, ranking #745 of 3,247 tracked listings.

Weekly downloads
58,121
Official API · Dec 5, 2026
7-day growth
+7.3%
+3.9K weekly downloads
30-day growth
+14.8%
+7.5K weekly downloads
90-day growth
+59.6%
+21.7K weekly downloads
Rank
#745
▼ 6 in 7 days

About vite-plugin-restart

<h2 align='center'><samp>vite-plugin-restart</samp></h2> <p align='center'>Custom files/globs to restart Vite server</p> <p align='center'> <a href='https://www.npmjs.com/package/vite-plugin-restart'> <img src='https://img.shields.io/npm/v/vite-plugin-restart?color=222&style=flat-square'> </a> </p> <br> <p align="center"> <a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg"> <img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/> </a> </p> <br>

Usage

Install

npm i vite-plugin-restart -D # yarn add vite-plugin-restart -D

Add it to vite.config.js

// vite.config.js
import ViteRestart from 'vite-plugin-restart'

export default {
  plugins: [
    ViteRestart({
      restart: [
        'my.config.[jt]s',
      ]
    })
  ],
}

Changes to my.config.js or my.config.ts will now restart the server automatically.

Options

export interface VitePluginRestartOptions {
  /**
   * Enable glob support for watcher (it's disabled by Vite, but add this plugin will turn it on by default)
   * @default true
   */
  glob?: boolean
  /**
   * Delay in ms before restarting the server
   * @default 500
   */
  delay?: number
  /**
   * Array of files to watch, changes to those file will trigger a server restart
   */
  restart?: string | string[]
  /**
   * Array of files to watch, changes to those file will trigger a client full page reload
   */
  reload?: string | string[]
  /**
   * Enable content-based change detection to prevent unnecessary restarts
   * when file metadata changes but content remains the same
   * @default true
   */
  contentCheck?: boolean
}
Content-Based Change Detection

By default, the plugin now uses content-based change detection (contentCheck: true). This prevents infinite restart loops when watching auto-generated files that may be rewritten with the same content.

For example, when watching .eslintrc-auto-import.json:

export default {
  plugins: [
    ViteRestart({
      restart: [
        '.eslintrc-auto-import.json',
      ],
      // Content check is enabled by default
      // Only restarts if file content actually changes
      contentCheck: true,
    })
  ],
}

The plugin calculates a SHA-256 hash of the file content and only triggers a restart if the hash changes. This solves the problem of:

  • Auto-generated files being rewritten during the build process
  • File modification timestamps changing without actual content changes
  • Infinite restart loops caused by files being regenerated on every server restart

You can disable this feature if needed:

export default {
  plugins: [
    ViteRestart({
      restart: ['my.config.js'],
      contentCheck: false, // Disable content-based detection
    })
  ],
}

Motivation

Byebye nodemon -w my.config.js -x 'vite'

License

MIT License © 2021 Anthony Fu

Description from the npm listing.

  • vite-plugin

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

vite-plugin-restart weekly downloads on npm, last 90 days: 58,121 weekly downloads as of Dec 5, 2026, +59.6% over 90 days.vite-plugin-restartWeekly downloads on npm · Last 90 days58,121downloads / week+59.6% over 90 days010K20K30K40K50K60KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
vite-plugin-restart weekly downloads on npm, last 90 days: 58,121 weekly downloads as of Dec 5, 2026, +59.6% over 90 days.

7/30/90-day growth

vite-plugin-restart weekly downloads growth on npm: +7.3% over 7 days, +14.8% over 30 days, +59.6% over 90 days.vite-plugin-restartWeekly downloads growth on npm58,121downloads / week now7-day growth+3,931 weekly downloads+7.3%30-day growth+7,488 weekly downloads+14.8%90-day growth+21,706 weekly downloads+59.6%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-restart weekly downloads growth on npm: +7.3% over 7 days, +14.8% over 30 days, +59.6% over 90 days.

Ranking history

vite-plugin-restart npm ranking history: currently #745 (by weekly downloads).vite-plugin-restartnpm ranking · by weekly downloads · Last 90 days#745current rank#720#730#740#750#760#770#780#790Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-restart npm ranking history: currently #745 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 38, #5 (overall #745)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 7, #11 (overall #131)
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 (170)
Recent weekly downloads observations for vite-plugin-restart
Date (UTC)Weekly downloadsChange vs. previous
58,121+362
57,759+760
56,999+1.1K
55,923+1.5K
54,413-235
54,648+142
54,506+316
54,190+226
53,964-784
54,748-1.2K
55,968-2.6K
58,585+1.4K
57,156+716
56,440—

Similar npm Vite plugins plugins

All 20 vite-plugin-restart alternatives

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/vite-plugin-restart. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.