Skip to content
PluginStats

strip-console weekly downloads statistics

By i-m-anurag · npm · Webpack plugins

Strip console.* calls from JavaScript and TypeScript code

View on npm Fresh · Oct 17, 2026

strip-console has 3 recorded weekly downloads on npm.

It ranks #2132 of 2,251 tracked npm listings by weekly downloads.

Over the past 7 days it changed by -99.6%.

PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.

Weekly downloads
3
Official API · Oct 17, 2026
7-day growth
-99.6%
-717 weekly downloads
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#2132
Among tracked npm listings

About strip-console

strip-console

Strip console.* calls and debugger statements from JavaScript and TypeScript code, without breaking the code around them.

• Works as a plugin for Vite, Rollup, Rolldown, webpack, Rspack and esbuild. • Ships a CLI that rewrites a build folder in place, or audits it in CI. • Keeps arguments with side effects, keeps console.warn and console.error by default, and produces source maps.

Contents

• Install • Bundler plugin • CLI • Audit in CI • Next.js • Angular • What gets removed • Options • JavaScript API • Compared with other tools • Versioning • Development

Install

Requires Node.js 22.12 or newer.

Bundler plugin

Every entry exports one function that takes the options below.

Vite

The Vite plugin only runs during vite build, so console.log still works in the dev server.

Rollup

Rolldown

webpack

Rspack

The webpack and Rspack plugins run in every mode, so add them only to production builds as shown.

esbuild

Plugin-only options

| Option | Default | Meaning |

| include | JS, TS, JSX, TSX, .vue, .svelte, .astro | Modules to process | | exclude | node_modules | Modules to skip | | chunks | false | Also process the final output chunks (Vite, Rollup and Rolldown only) | | runtimeGuard | false | Add a runtime stub that silences the removed methods (see below) |

By default the plugin skips node_modules. Set chunks: true to also clean the bundled output, which catches console calls in dependencies and in compiled framework files. Files that fail to parse are skipped with a warning instead of failing the build.

Runtime guard

Static removal cannot see calls whose method name is only known at runtime, such as consolelevel. With runtimeGuard: true, the plugin adds a small script to the top of each entry chunk that replaces the listed methods with empty functions:

The guard silences every call to those methods, including ones kept with a /* keep */ comment, and leaves console.warn and console.error alone unless you list them. It works with every bundler above. For other setups, createRuntimeGuard(methods) from strip-console returns the script as a string, ready to inline at the top of your entry file.

CLI

The CLI works on files that are already built, so it fits any toolchain, including ones without a plugin hook.

With no folder given, both commands use dist. When a file has a .map next to it, the rewrite updates the map so it still points at your original sources.

| Flag | Meaning |

| --methods | Console methods to remove, such as log,debug | | --loggers | Extra callees to remove, such as logger.debug | | --keep-comment | Comment text that keeps the next call | | --no-debugger | Keep debugger statements | | --include | Files to process (default **/*.{js,mjs,cjs}) | | --exclude | Files to skip (default /node_modules/) | | --config | Read settings from this file | | --json | Print a machine-readable report | | --dry-run | Rewrite command only: report without writing |

Config file

Settings can live in strip-console.config.json, strip-console.config.mjs, strip-console.config.js, or a "stripConsole" key in package.json. Flags override the file.

Audit in CI

strip-console audit exits with code 1 when any console call is left, so it can guard a build even if you never rewrite files.

A failing run prints one line per call, so the log shows exactly where to look:

The same check works as a script in package.json:

Use --json to feed the report into another tool. It contains scanned, calls, a files list with each call's method, line and column, and an errors list for files that could not be parsed.

Next.js

Next.js 16 builds with Turbopack, which does not run bundler plugins, so run the CLI on the browser output after next build:

.next/static holds only the code sent to the browser, so server-side logs stay. Add strip-console audit .next/static to CI to check the result.

If you build with webpack (next build --webpack), you can use the plugin instead. Add it to client production builds only:

Angular

The Angular CLI's esbuild builder does not take extra plugins, so run the CLI on the browser output after ng build. Replace my-app with the project name from angular.json:

This also removes console.log calls inside Angular's own production code. Add strip-console audit dist/my-app/browser to CI to check the result.

What gets removed

With the default options:

| Input | Output |

| console.log('ready'); | *(line removed)* | | console.log(i++); | i++; | | console.log(await load()); | await load(); | | if (debug) console.log(state); | if (debug) ; | | const done = () => console.log('done'); | const done = () => void 0; | | console?.log?.(x); | *(line removed)* | | window.console.info('hi'); | *(line removed)* | | const { log } = console; log('x'); | *(both removed)* | | debugger; | *(line removed)* | | console.warn('slow'); | unchanged | | /* keep */ console.log('build id', id); | unchanged |

Calls through globalThis, self and global are matched too, as long as console or those names are not redeclared locally. A local variable named console is never touched.

Options

These apply to the plugin, the CLI and the JavaScript API.

| Option | Default | Meaning |

| methods | ['log', 'debug', 'info', 'trace'] | Console methods to remove | | loggers | [] | Extra callees to remove, such as 'logger.debug' | | keepComment | 'keep' | Comment text that preserves the next call | | debugger | true | Also remove debugger statements | | sourcemap | true | Return a source map (API only) | | filename | 'input.js' | Picks the parser and names the map source (API only) |

Unknown options and values of the wrong type throw a TypeError that names the option, and suggest the right name for a typo such as method. The CLI exits with code 2 and names the config file.

JavaScript API

transform throws a SyntaxError when the code does not parse. removed lists each removed call with its method, 1-based line and 0-based column.

Compared with other tools…

Description from the npm listing.

  • build
  • console
  • console.log
  • esbuild-plugin
  • remove
  • rollup-plugin
  • strip
  • unplugin
  • vite-plugin
  • webpack-plugin

Where strip-console sits in the listing

Each band is one page of 20. Weekly downloads on a log 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.

All npm2,248 listings · 113 pages · page 107, #13 (overall #2133)
All npm: every listing in weekly downloads order
PNG SVG
Webpack plugins247 listings · 13 pages · page 12, #13 (overall #233)
Webpack plugins: every listing in weekly downloads order
PNG SVG

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

strip-console weekly downloads on npm, last 90 days: 3 weekly downloads as of Oct 17, 2026.strip-consoleWeekly downloads on npm · Last 90 days3downloads / week02004006008001KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 20, 2026 – Oct 17, 2026 · 90 observations · Updated Oc…pluginstats.com
strip-console weekly downloads on npm, last 90 days: 3 weekly downloads as of Oct 17, 2026.
PNG SVG

7/30/90-day growth

strip-console weekly downloads growth on npm: -99.6% over 7 days, 30-day growth unavailable, 90-day growth unavailable.strip-consoleWeekly downloads growth on npm3downloads / week now7-day growth-717 weekly downloads-99.6%30-day growth+3 weekly downloadsInsufficient history90-day growth+3 weekly downloadsInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
strip-console weekly downloads growth on npm: -99.6% over 7 days, 30-day growth unavailable, 90-day growth unavailable.
PNG SVG

Ranking history

strip-console npm ranking history: currently #2132 (by weekly downloads).strip-consolenpm ranking · by weekly downloads · Last 90 days#2132current rank#2130#2131#2132#2133#2134Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18rankOct 18, 2026 – Oct 18, 2026 · 1 observations · Updated Oct 17, 2026pluginstats.com
strip-console npm ranking history: currently #2132 (by weekly downloads).
PNG SVG

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.

Recent observations

Full history (121)
Recent weekly downloads observations for strip-console
Date (UTC)Weekly downloadsChange vs. previous
3-10
13-1
14-15
29-5
340
34-48
82-638
720-156
876+2
874+15
859+5
8540
854+49
805—

Similar npm Webpack plugins plugins

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/strip-console. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.