Skip to content
PluginStats

webpack-plugin-replace weekly downloads statistics

By lukeed (2 listings) · npm · Webpack plugins

Replace content while bundling.

View on npm Fresh · Dec 6, 2026

webpack-plugin-replace has 13,110 recorded weekly downloads on npm, a decrease of 1.5% over the past 30 days, ranking #1181 of 3,247 tracked listings.

Weekly downloads
13,110
Official API · Dec 5, 2026
7-day growth
-3.6%
-489 weekly downloads
30-day growth
-1.5%
-203 weekly downloads
90-day growth
+1.5%
+192 weekly downloads
Rank
#1181
▼ 35 in 7 days

About webpack-plugin-replace

webpack-plugin-replace Build Status

Replace content while bundling.

Install

$ npm install --save-dev webpack-plugin-replace

Usage

// webpack.config.js
const ReplacePlugin = require('webpack-plugin-replace');

module.exports = {
  // ...
  plugins: [
    new ReplacePlugin({
      exclude: [
        'foo.js',
        /node_modules/,
        filepath => filepath.includes('ignore')
      ],
      patterns: [{
        regex: /throw\s+(new\s+)?(Type|Reference)?Error\s*\(/g,
        value: 'return;('
      }],
      values: {
        'process.env.NODE_ENV': JSON.stringify('production'),
        'FOO_BAR': '"hello world"',
        'DEV_MODE': false,
      }
    })
  ]
};

API

webpack-plugin-replace(options)
options.exclude

Type: Array|String|Function|RegExp<br> Default: false

If multiple conditions are provided, matching any condition will exclude the filepath, which prevents any alterations.

Note: By default, nothing is excluded!

options.include

Type: Array|String|Function|RegExp<br> Default: true

If multiple conditions are provided, matching any condition will include & scan the filepath for eligible replacements.

Note: By default, all filepaths are included!

options.patterns

Type: Array<br> Default: []

An array of RegExp pattern definitions. Each definition is an object with regex <RegExp> and value <String|Function> keys. If value is a function, it takes the same arguments as String.prototype.relace.

options.values

Type: Object<br> Default: {}

An object whose keys are strings that should be replaced and whose values are strings the replacements.

If desired, you may forgo the values key & declare your key:value pairs directly to the main configuration. For example:

{
  exclude: /node_modules/,
  values: {
    'process.env.NODE_ENV': JSON.stringify('production'),
  }
}

// is the same as:

{
  exclude: /node_modules/,
  'process.env.NODE_ENV': JSON.stringify('production'),
}

License

MIT © Luke Edwards

Description from the npm listing.

  • bundle
  • content
  • plugin
  • replace
  • string
  • text
  • webpack
  • webpack-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

webpack-plugin-replace weekly downloads on npm, last 90 days: 13,110 weekly downloads as of Dec 5, 2026, +1.5% over 90 days.webpack-plugin-replaceWeekly downloads on npm · Last 90 days13,110downloads / week+1.5% over 90 days02K4K6K8K10K12K14K16KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
webpack-plugin-replace weekly downloads on npm, last 90 days: 13,110 weekly downloads as of Dec 5, 2026, +1.5% over 90 days.

7/30/90-day growth

webpack-plugin-replace weekly downloads growth on npm: -3.6% over 7 days, -1.5% over 30 days, +1.5% over 90 days.webpack-plugin-replaceWeekly downloads growth on npm13,110downloads / week now7-day growth-489 weekly downloads-3.6%30-day growth-203 weekly downloads-1.5%90-day growth+192 weekly downloads+1.5%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
webpack-plugin-replace weekly downloads growth on npm: -3.6% over 7 days, -1.5% over 30 days, +1.5% over 90 days.

Ranking history

webpack-plugin-replace npm ranking history: currently #1181 (by weekly downloads).webpack-plugin-replacenpm ranking · by weekly downloads · Last 90 days#1181current rank#1060#1080#1100#1120#1140#1160#1180#1200Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
webpack-plugin-replace npm ranking history: currently #1181 (by weekly downloads).

Listing placement

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

Listing placement

Webpack plugins349 listings · 18 pages · page 2, #9 (overall #29)
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 (170)
Recent weekly downloads observations for webpack-plugin-replace
Date (UTC)Weekly downloadsChange vs. previous
13,110+116
12,994-119
13,113-377
13,490-55
13,545+62
13,483-374
13,857+258
13,599-461
14,060-345
14,405-207
14,612-157
14,769-297
15,066-41
15,107—

Similar npm Webpack plugins plugins

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