Skip to content
PluginStats

vite-plugin-node weekly downloads statistics

By axe-me · npm · Vite plugins

Vite plugin to enable your node server HMR

View on npm Fresh · Dec 6, 2026

vite-plugin-node has 102,664 recorded weekly downloads on npm, a decrease of 12.5% over the past 30 days, ranking #635 of 3,247 tracked listings.

Weekly downloads
102,664
Official API · Dec 5, 2026
7-day growth
-11.3%
-13.1K weekly downloads
30-day growth
-12.5%
-14.6K weekly downloads
90-day growth
+41.1%
+29.9K weekly downloads
Rank
#635
▼ 32 in 7 days

About vite-plugin-node

<p align="center"> <img src="./node-vite.png" width="200px"> </p> <p align="center"> <a href="https://www.npmjs.com/package/vite-plugin-node"><img src="https://img.shields.io/npm/v/vite-plugin-node.svg" alt="npm package"></a> <a href="https://nodejs.org/en/about/releases/"><img src="https://img.shields.io/node/v/vite-plugin-node.svg" alt="node compatibility"></a> </p>

Vite Plugin Node

A vite plugin to allow you to use vite as node dev server.

Features

  • All the perks from Vite plus:
  • Node server HMR! (hot module replacement)
  • Support Express, Fastify, Koa and Nest out of the box
  • Support Custom Request Adapter
  • You can choose to use esbuild or swc to compile your typescript files

Get started


  1. Install vite and this plugin with your favorite package manager, here use npm as example:

    npm install vite vite-plugin-node -D
    
  2. Create a vite.config.ts file in your project root to config vite to actually use this plugin:

    import { defineConfig } from 'vite';
    import { VitePluginNode } from 'vite-plugin-node';
    
    export default defineConfig({
      // ...vite configures
      server: {
        // vite server configs, for details see [vite doc](https://vitejs.dev/config/#server-host)
        port: 3000
      },
      plugins: [
        ...VitePluginNode({
          // Nodejs native Request adapter
          // currently this plugin support 'express', 'nest', 'koa' and 'fastify' out of box,
          // you can also pass a function if you are using other frameworks, see Custom Adapter section
          adapter: 'express',
    
          // tell the plugin where is your project entry
          appPath: './app.ts',
    
          // Optional, default: 'viteNodeApp'
          // the name of named export of you app from the appPath file
          exportName: 'viteNodeApp',
    
          // Optional, default: 'esbuild'
          // The TypeScript compiler you want to use
          // by default this plugin is using vite default ts compiler which is esbuild
          // 'swc' compiler is supported to use as well for frameworks
          // like Nestjs (esbuild dont support 'emitDecoratorMetadata' yet)
          // you need to INSTALL `@swc/core` as dev dependency if you want to use swc
          tsCompiler: 'esbuild',
    
          // Optional, default: {
          // jsc: {
          //   target: 'es2019',
          //   parser: {
          //     syntax: 'typescript',
          //     decorators: true
          //   },
          //  transform: {
          //     legacyDecorator: true,
          //     decoratorMetadata: true
          //   }
          // }
          //}
          // swc configs, see [swc doc](https://swc.rs/docs/configuration/swcrc)
          swcOptions: {}
        })
      ]
    });
    
  3. Update your server entry to export your app named viteNodeApp or the name you configured.

ExpressJs
const app = express();

// your beautiful code...

if (import.meta.env.PROD) {
  app.listen(3000);
}

export const viteNodeApp = app;
KoaJs
import Koa from 'koa';

const app = new Koa();

// your beautiful code...

if (import.meta.env.PROD) {
  app.listen(3000);
}

export const viteNodeApp = app;
Cloud Functions
const app = async (req, res) => {
  // your beautiful code...
};

export const viteNodeApp = app;
Fastify
import fastify from 'fastify';

const app = fastify();

// your beautiful code...

if (import.meta.env.PROD) {
  app.listen(3000);
}

export const viteNodeApp = app;

if the app created by an async factory function you can just export the promise.

import fastify from 'fastify';

const app = async (options) => {
  const app = fastify(options);
  // app logics...
  return app;
};

// note here we need to run the function to get the promise.
export const viteNodeApp = app(options);
NestJs
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';

if (import.meta.env.PROD) {
  async function bootstrap() {
    const app = await NestFactory.create(AppModule);
    await app.listen(3000);
  }

  bootstrap();
}

export const viteNodeApp = NestFactory.create(AppModule); // this returns a Promise, which is ok, this plugin can handle it
  1. Add a npm script to run the dev server:

    "scripts": {
      "dev": "vite"
    },
    
  2. Run the script! npm run dev

Custom Adapter

If your favorite framework not supported yet, you can either create an issue to request it or use the adapter option to tell the plugin how to pass down the request to your app. You can take a look how the supported frameworks implementations from the ./src/server folder. Example:

import { defineConfig } from 'vite';
import { VitePluginNode } from 'vite-plugin-node';

export default defineConfig({
  plugins: [
    ...VitePluginNode({
      adapter: function (app, req, res) {
        app(res, res);
      },
      appPath: './app.ts'
    })
  ]
});

Build

This plugin leverages Vite SSR mode to build your app. All you need to do is add a build script to your package.json:

"scripts": {
  "build": "vite build"
},

For more build config please check vite doc

Examples

See the examples folder.

Why?


While frontend development tooling is evolving rapidly in recent years, backend DX is still like in stone age. No hot module replacement; Typescript recompiling slow as funk; Lack of plugin system etc. Thanks to Vite.js created by Evan You (A.K.A creator of vue.js; my biggest idol developer), makes all those dreams for backend development come true!

How?

---…

Description from the npm listing.

  • vite
  • vite-plugin
  • node
  • hmr

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-node weekly downloads on npm, last 90 days: 102,664 weekly downloads as of Dec 5, 2026, +41.1% over 90 days.vite-plugin-nodeWeekly downloads on npm · Last 90 days102,664downloads / week+41.1% over 90 days020K40K60K80K100K120K140KSep 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-node weekly downloads on npm, last 90 days: 102,664 weekly downloads as of Dec 5, 2026, +41.1% over 90 days.

7/30/90-day growth

vite-plugin-node weekly downloads growth on npm: -11.3% over 7 days, -12.5% over 30 days, +41.1% over 90 days.vite-plugin-nodeWeekly downloads growth on npm102,664downloads / week now7-day growth-13,095 weekly downloads-11.3%30-day growth-14,606 weekly downloads-12.5%90-day growth+29,918 weekly downloads+41.1%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-node weekly downloads growth on npm: -11.3% over 7 days, -12.5% over 30 days, +41.1% over 90 days.

Ranking history

vite-plugin-node npm ranking history: currently #635 (by weekly downloads).vite-plugin-nodenpm ranking · by weekly downloads · Last 90 days#635current rank#200#300#400#500#600#700Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-node npm ranking history: currently #635 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 32, #15 (overall #635)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 6, #3 (overall #103)
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 (592)
Recent weekly downloads observations for vite-plugin-node
Date (UTC)Weekly downloadsChange vs. previous
102,664-1.7K
104,355+3.3K
101,090-3.7K
104,752+83
104,669-6.4K
111,058-5.5K
116,520+761
115,759+258
115,501+674
114,827+3.3K
111,533+784
110,749-2.5K
113,249-4.6K
117,828—

Similar npm Vite plugins plugins

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