Skip to content
PluginStats

vite-plugin-node-polyfills weekly downloads statistics

By davidmyersdev · npm · Vite plugins

A Vite plugin to polyfill Node's Core Modules for browser environments.

View on npm Fresh · Dec 6, 2026

vite-plugin-node-polyfills has 2,996,996 recorded weekly downloads on npm, an increase of 33.0% over the past 30 days, ranking #198 of 3,247 tracked listings.

Weekly downloads
2,996,996
Official API · Dec 5, 2026
7-day growth
+14.8%
+386K weekly downloads
30-day growth
+33.0%
+743.1K weekly downloads
90-day growth
+102%
+1.5M weekly downloads
Rank
#198
▲ 5 in 7 days

About vite-plugin-node-polyfills

Sponsor me Donate

vite-plugin-node-polyfills

A Vite plugin to polyfill Node's Core Modules for browser environments. Supports node: protocol imports.

Why do I need this?

Module "stream" has been externalized for browser compatibility. Cannot access "stream.Readable" in client code.

Since browsers do not support Node's Core Modules, packages that use them must be polyfilled to function in browser environments. In an attempt to prevent runtime errors, Vite produces errors or warnings when your code references builtin modules such as fs or path.

Getting Started

Install the package as a dev dependency.

# npm
npm install --save-dev vite-plugin-node-polyfills

# pnpm
pnpm install --save-dev vite-plugin-node-polyfills

# yarn
yarn add --dev vite-plugin-node-polyfills

Add the plugin to your vite.config.ts file.

import { defineConfig } from 'vite'
import { nodePolyfills } from 'vite-plugin-node-polyfills'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    nodePolyfills(),
  ],
})
Customizable when you need it

The following options are available to customize it for your needs.

import { defineConfig } from 'vite'
import { nodePolyfills } from 'vite-plugin-node-polyfills'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    nodePolyfills({
      // To add only specific polyfills, add them here. If no option is passed, adds all polyfills
      include: ['path'],
      // To exclude specific polyfills, add them to this list. Note: if include is provided, this has no effect
      exclude: [
        'http', // Excludes the polyfill for `http` and `node:http`.
      ],
      // Whether to polyfill specific globals.
      globals: {
        Buffer: true, // can also be 'build', 'dev', or false
        global: true,
        process: true,
      },
      // Override the default polyfills for specific modules.
      overrides: {
        // Since `fs` is not supported in browsers, we can use the `memfs` package to polyfill it.
        fs: 'memfs',
      },
      // Whether to polyfill `node:` protocol imports.
      protocolImports: true,
    }),
  ],
})
All polyfills
  • If protocolImports is true, also adds node:[module]
[
  '_stream_duplex',
  '_stream_passthrough',
  '_stream_readable',
  '_stream_transform',
  '_stream_writable',
  'assert',
  'buffer',
  'child_process',
  'cluster',
  'console',
  'constants',
  'crypto',
  'dgram',
  'dns',
  'domain',
  'events',
  'fs',
  'http',
  'http2',
  'https',
  'module',
  'net',
  'os',
  'path',
  'process',
  'punycode',
  'querystring',
  'readline',
  'repl',
  'stream',
  'string_decoder',
  'sys',
  'timers',
  'timers/promises',
  'tls',
  'tty',
  'url',
  'util',
  'vm',
  'zlib',
]

About the author

Hello! My name is David, and in my spare time, I build tools to help developers be more productive. If you find my work valuable, I would really appreciate a sponsorship or donation. If you want to see more of my work, check out davidmyers.dev.

Thanks for your support! 🪴

Description from the npm listing.

  • node
  • node-core-modules
  • node-polyfills
  • node-stdlib
  • polyfills
  • vite
  • 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-node-polyfills weekly downloads on npm, last 90 days: 2,996,996 weekly downloads as of Dec 5, 2026, +102% over 90 days.vite-plugin-node-polyfillsWeekly downloads on npm · Last 90 days2,996,996downloads / week+102% over 90 days0500K1M1.5M2M2.5M3MSep 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-polyfills weekly downloads on npm, last 90 days: 2,996,996 weekly downloads as of Dec 5, 2026, +102% over 90 days.

7/30/90-day growth

vite-plugin-node-polyfills weekly downloads growth on npm: +14.8% over 7 days, +33.0% over 30 days, +102% over 90 days.vite-plugin-node-polyfillsWeekly downloads growth on npm2,996,996downloads / week now7-day growth+385,967 weekly downloads+14.8%30-day growth+743,097 weekly downloads+33.0%90-day growth+1,514,391 weekly downlo…+102%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-node-polyfills weekly downloads growth on npm: +14.8% over 7 days, +33.0% over 30 days, +102% over 90 days.

Ranking history

vite-plugin-node-polyfills npm ranking history: currently #198 (by weekly downloads).vite-plugin-node-polyfillsnpm ranking · by weekly downloads · Last 90 days#198current rank#194#196#198#200#202#204#206#208Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-node-polyfills npm ranking history: currently #198 (by weekly downloads).

Listing placement

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

Listing placement

Vite plugins300 listings · 15 pages · page 2, #2 (overall #22)
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-node-polyfills
Date (UTC)Weekly downloadsChange vs. previous
2,996,996+36.4K
2,960,630+107.4K
2,853,185+125.7K
2,727,499+43.2K
2,684,339+20.5K
2,663,857+31.3K
2,632,514+21.5K
2,611,029-8K
2,618,998-19.6K
2,638,613-88.8K
2,727,397-66.1K
2,793,534+32.1K
2,761,389-10.3K
2,771,642—

Similar npm Vite plugins plugins

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