Skip to content
PluginStats

use-as-dictionary weekly downloads statistics

By giorgiopellegrino · npm · Webpack plugins

Webpack and Vite plugins for Compression Dictionary Transport with Shared Brotli dictionaries

View on npm Fresh · Nov 5, 2026

use-as-dictionary has 209 recorded weekly downloads on npm, ranking #1864 of 2,855 tracked listings.

Weekly downloads
209
Official API · Nov 3, 2026
7-day growth
—
Insufficient history
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#1864
Among tracked npm listings

About use-as-dictionary

use-as-dictionary

A plugin for Webpack 5 and Vite 8 that generates compression dictionaries and Shared Brotli (dcb) representations for Compression Dictionary Transport.

Both adapters read final build assets after minification and content hashing, then use the same compression core to emit raw dictionaries, compressed representations, and a dictionary manifest. They can preserve a dictionary between builds and replace it when compression savings fall below a configured threshold.

The plugin works independently of Vue. The Vue + Webpack and Vue + Vite examples share a Vue interface and an HTTP server that implements dictionary discovery, encoding negotiation, and fallback compression.

Requirements and installation

  • Node.js 22.12 or later.
  • Webpack 5 or Vite 8 in the consuming project.
  • A server or CDN configured to serve Compression Dictionary Transport responses; see HTTP integration.

Install the plugin with the bundler your project uses. For Webpack:

npm install --save-dev use-as-dictionary "webpack@^5"

For Vite:

npm install --save-dev use-as-dictionary "vite@^8"

Webpack and Vite are optional peer dependencies. Install your chosen bundler; neither adapter requires the other bundler to be installed.

For local development, you can also install the checkout directly after running npm ci there:

npm install --save-dev /absolute/path/to/use-as-dictionary

The package includes both adapters, their shared compression core, and the documentation. brotli-wasm-custom-dictionary is installed as a runtime dependency; Vue and the example server belong to the repository's examples.

ImportExport
use-as-dictionary/webpackThe CompressionDictionaryPlugin class for Webpack.
use-as-dictionary/viteThe CompressionDictionaryPlugin class for Vite.

Import the class for your bundler and create a plugin with new CompressionDictionaryPlugin(options).

Webpack configuration

Add the plugin to your existing Webpack configuration. This example assumes your CSS extraction plugin emits one file matching dist/styles.<hash>.css:

const path = require('node:path');
const CompressionDictionaryPlugin = require('use-as-dictionary/webpack');

// Add this instance to the plugins array in webpack.config.cjs.
new CompressionDictionaryPlugin({
  test: /^dist\/styles\.[a-f0-9]+\.css$/,
  dictionarySource: path.resolve(__dirname, '.dictionary-cache/styles.dat'),
  autoUpdate: { minSavings: 0.9 },
});

With output.path set to build/, this produces:

build/
├── dictionaries/
│   ├── styles.<sha256>.dat
│   └── compression-dictionary-manifest.json
└── dist/
    ├── styles.<contenthash>.css
    └── styles.<contenthash>.css.dcb

The original CSS remains available for fallback responses. The .dcb file is an alternative representation of that CSS, served at the original CSS URL with Content-Encoding: dcb.

For a complete configuration, see the example's webpack.config.cjs.

Vite configuration

Import the Vite adapter and add it to your vite.config.mjs:

import { defineConfig } from 'vite';
import CompressionDictionaryPlugin from 'use-as-dictionary/vite';

export default defineConfig({
  plugins: [
    new CompressionDictionaryPlugin({
      test: /\.css$/,
      dictionarySource: '.dictionary-cache/styles.dat',
      autoUpdate: { minSavings: 0.9 },
    }),
  ],
  build: {
    cssCodeSplit: false,
  },
});

This configuration combines CSS into one asset so the automatic dictionary has one resource to track. Adapt the selector if your build emits different assets. The adapter runs during vite build, processes final assets in generateBundle, and preserves their original filenames. Each selected resource gets a .dcb representation beside it; the dictionary and manifest have the same format as the Webpack output.

Place every CompressionDictionaryPlugin instance after plugins that modify final assets in generateBundle. With autoUpdate, the last adapter instance must also follow other plugins with writeBundle hooks using order: 'post'; incompatible ordering fails the build. Move any such plugins from output.plugins into Vite's plugins array before the adapter.

The adapter applies only to builds. Vite's development server does not generate dictionaries or implement discovery and HTTP negotiation. The Vite example builds the app and serves it through the shared Node server. Its vite.config.js places the CSS and JavaScript under dist/ for that server.

Vite builds must use one directory output. Multiple outputs and output.file are unsupported; library builds must select one output format. autoUpdate cannot be combined with build.watch. Run completed builds to update persistent dictionaries. With build.write: false, compressed assets can be generated in memory, but the persistent dictionary is not written.

Options

Both adapters accept the same options. Specify exactly one of test and input. Relative input and dictionary paths resolve against Webpack's context or Vite's root.…

Description from the npm listing.

  • webpack
  • webpack-plugin
  • vite
  • vite-plugin
  • compression-dictionary-transport
  • brotli
  • dcb

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

use-as-dictionary weekly downloads on npm, last 90 days: 209 weekly downloads as of Nov 3, 2026.use-as-dictionaryWeekly downloads on npm · Last 90 days209downloads / week180190200210220230Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19Nov 3downloads / weekNov 3, 2026 – Nov 3, 2026 · 1 observations · Updated Nov 3, 2026pluginstats.com
use-as-dictionary weekly downloads on npm, last 90 days: 209 weekly downloads as of Nov 3, 2026.

7/30/90-day growth

use-as-dictionary weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.use-as-dictionaryWeekly downloads growth on npm209downloads / week now7-day growthinsufficient historyInsufficient history30-day growthinsufficient historyInsufficient history90-day growthinsufficient historyInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Nov 3, 2026pluginstats.com
use-as-dictionary weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

use-as-dictionary npm ranking history: currently #1864 (by weekly downloads).use-as-dictionarynpm ranking · by weekly downloads · Last 90 days#1864current rank#1862#1863#1864#1865#1866Aug 7Aug 22Sep 6Sep 21Oct 6Oct 21Nov 5rankNov 5, 2026 – Nov 5, 2026 · 1 observations · Updated Nov 3, 2026pluginstats.com
use-as-dictionary npm ranking history: currently #1864 (by weekly downloads).

Listing placement

All npm2,853 listings · 143 pages · 1,427 shown · page 110, #5 (overall #2,185)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins300 listings · 15 pages · page 7, #4 (overall #124)
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 (1)
Recent weekly downloads observations for use-as-dictionary
Date (UTC)Weekly downloadsChange vs. previous
209—

Similar npm Webpack plugins plugins

All 20 use-as-dictionary 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/use-as-dictionary. First seen Nov 5, 2026; last successful collection Nov 5, 2026. See the methodology.