Skip to content
PluginStats

primus-webpack-plugin weekly downloads statistics

By kkemple · npm · Webpack plugins

Build client side primus script and add to build assets

View on npm Stale · Dec 1, 2026

primus-webpack-plugin has 6 recorded weekly downloads on npm, a decrease of 81.3% over the past 30 days, ranking #3212 of 3,247 tracked listings.

Weekly downloads
6
Official API · Dec 5, 2026
7-day growth
-14.3%
-1 weekly downloads
30-day growth
-81.3%
-26 weekly downloads
90-day growth
0.0%
0 weekly downloads
Rank
#3212
▼ 160 in 7 days

About primus-webpack-plugin

PrimusWebpackPlugin

Build client side Primus script and add to build assets 📦⚡

Introduction

Primus is a socket wrapper implementation that requires a built client library. The client library also needs to match the configuration of the server side implementation. Primus handles this by exposing primus.library() which returns the client library as a string.

This is problematic in applications that bundle and dynamically generate client assets. It is also problematic because unless you want to serve the client script directly from your websocket server (not a great approach IMO) you need to prebuild and package the client script anyway.

This plugin allows you to pass in your Primus options and then adds the client library to your Webpack build assets.

If HtmlWebpackPlugin is being used it will also add the asset to the output HTML :tada:

Usage

Install PrimusWebpackPlugin:

npm install --save-dev primus-webpack-plugin

With Yarn:

yarn add -D primus-webpack-plugin

In webpack.config.js:

const PrimusWebpackPlugin = require('primus-webpack-plugin')

...

new PrimusWebpackPlugin({
  filename: 'primus-client.[hash].js',
  minify: true,
  primusOptions: {
    transformer: 'uws',
    parser: {
      encoder: function (data, fn) {
        fn(null, JSON.stringify(data))
      },
      decoder: function (data, fn) {
        fn(null, JSON.parse(data))
      }
    }
  }
})

Options:

NameDescriptionDefault
filenameName of generated fileprimus-client.js
minifyWhether or not to minify the filefalse
primusOptionsOptions for the Primus Server{}

https://github.com/primus/primus#getting-started

Caveats

primus.library() generates a UMDish style file but it doesn't seem to work being bundled with Webpack, instead a global Primus constructor is added. If you want to require/import Primus you will need to shim it in your Webpack config.

Description from the npm listing.

  • webpack-plugin
  • webpack
  • primus
  • sockets

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

primus-webpack-plugin weekly downloads on npm, last 90 days: 6 weekly downloads as of Dec 5, 2026, 0.0% over 90 days.primus-webpack-pluginWeekly downloads on npm · Last 90 days6downloads / week0.0% over 90 days050100150200250Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
primus-webpack-plugin weekly downloads on npm, last 90 days: 6 weekly downloads as of Dec 5, 2026, 0.0% over 90 days.

7/30/90-day growth

primus-webpack-plugin weekly downloads growth on npm: -14.3% over 7 days, -81.3% over 30 days, 0.0% over 90 days.primus-webpack-pluginWeekly downloads growth on npm6downloads / week now7-day growth-1 weekly downloads-14.3%30-day growth-26 weekly downloads-81.3%90-day growth+0 weekly downloads0.0%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
primus-webpack-plugin weekly downloads growth on npm: -14.3% over 7 days, -81.3% over 30 days, 0.0% over 90 days.

Ranking history

primus-webpack-plugin npm ranking history: currently #3212 (by weekly downloads).primus-webpack-pluginnpm ranking · by weekly downloads · Last 90 days#3212current rank#500#1000#1500#2000#2500#3000#3500Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 42 observations · Updated Dec 5, 2026pluginstats.com
primus-webpack-plugin npm ranking history: currently #3212 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 161, #14 (overall #3,214)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins349 listings · 18 pages · page 18, #2 (overall #342)
Webpack 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 primus-webpack-plugin
Date (UTC)Weekly downloadsChange vs. previous
60
6-1
70
7+1
6-1
7+1
6-1
70
7+1
6-37
43-1
440
440
44—

Similar npm Webpack plugins plugins

All 20 primus-webpack-plugin 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/primus-webpack-plugin. First seen Oct 16, 2026; last successful collection Dec 1, 2026. See the methodology.