Skip to content
PluginStats

webpack-typescript-obfuscator weekly downloads statistics

By jerry_me · npm · Webpack plugins

Webpack plugin that obfuscates TypeScript class names, class members and local bindings through ts-loader

View on npm Fresh · Dec 6, 2026

webpack-typescript-obfuscator has 108 recorded weekly downloads on npm, a change of -20.0% over the past 7 days, ranking #2613 of 3,247 tracked listings.

Weekly downloads
108
Official API · Dec 5, 2026
7-day growth
-20.0%
-27 weekly downloads
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#2613
▼ 156 in 7 days

About webpack-typescript-obfuscator

webpack-typescript-obfuscator

Webpack 5 plugin that obfuscates TypeScript class names, class members, and local variable bindings through ts-loader.

Unlike name-based minifiers, renames are resolved per class, so two unrelated classes that both define getName() can receive different generated names without affecting each other.

Install

npm install --save-dev webpack-typescript-obfuscator ts-loader typescript webpack

Usage

The plugin works by injecting getCustomTransformers into an existing ts-loader rule. It uses the real TypeScript Program created by ts-loader, so no extra loader, ts-patch, or ttypescript is required.

// webpack.config.cjs
const path = require("node:path");
const TypeScriptObfuscatorPlugin =
  require("webpack-typescript-obfuscator").default;

module.exports = {
  module: {
    rules: [
      {
        test: /\.[cm]?tsx?$/,
        exclude: /node_modules/,
        use: [{ loader: "ts-loader" }],
      },
    ],
  },
  plugins: [
    new TypeScriptObfuscatorPlugin({
      renameStringLiterals: true,
      // Shared across independently built packages so the same
      // class/member always receives the same generated name.
      identifierNamesCacheFilepath: path.resolve(
        __dirname,
        "typescript-obfuscator-cache.json",
      ),
      projectRoot: __dirname,
    }),
  ],
};

ESM configuration files work the same way:

import TypeScriptObfuscatorPlugin from "webpack-typescript-obfuscator";

The visible decorator

Import the no-op visible decorator from the ./visible subpath in application code:

import { visible } from "webpack-typescript-obfuscator/visible";

class UserService {
  @visible()
  getName(): string {
    return "alice";
  }

  // Renamed by the obfuscator.
  internalLookup(): string {
    return "a";
  }
}

The subpath is deliberately separate from the plugin entry: it has no dependencies on typescript, webpack, or Node built-ins, so importing it in browser code does not pull the plugin into the application bundle. Both @visible() and @visible are supported. The decorator name must match the visibleDecorator option (default: visible).

Rules

visible is an empty decorator used only as a marker while obfuscating. It is removed from the emitted code.

UsageEffect
@visible() on a memberKeeps that member's original name. Applies to methods, fields, accessors, and static members.
/** @visible */ on an interface memberEquivalent to the member-level marker. Use it when an interface member cannot carry a decorator. Implementations, subclasses, and interface call sites keep the original name together.
@visible() on a classKeeps only the class name. Its members are still renamed unless each one is marked.
Override groupA member overridden across a base class and a derived class forms one group. Marking any declaration in the group keeps the original name for the whole group, so polymorphic calls cannot land on the wrong implementation.
Inherited, not overriddenThe member still belongs to the base declaration; only a marker on that member itself decides. A class-level marker on the subclass does not affect inherited members.
Variables / parameters / functionsNo decorator semantics. They are renamed by default; use reservedNames to keep them.
Constructor parameter propertiesTreated as members. Only decorating the constructor parameter with @visible() keeps its name.
Class expressionsBoth named and anonymous class expressions take part in member renaming and override groups, just like class declarations.

Additional notes:

  • A class-level marker keeps the class name but not its members:

    @visible() // keeps "UserService"
    class UserService {
      internalLookup(): string {
        return "a"; // renamed
      }
    
      @visible() // keeps "getName"
      getName(): string {
        return "alice";
      }
    }
    
  • Marking one declaration keeps the whole override group:

    class BaseRepository {
      @visible()
      save(item: string) {}
    }
    
    class UserRepository extends BaseRepository {
      save(item: string) {} // still "save": same override group
    }
    
  • reservedNames applies to class names and non-member bindings only. For methods, fields, and accessors, only @visible() preserves the name.

  • Literal member references are rewritten to match renamed members, regardless of the legacy renameStringLiterals option.

  • Unresolvable reflection and dynamic keys such as obj[key] cannot be rewritten reliably. Mark externally accessed members with @visible() or avoid dynamic access.

File-level filtering

Large projects usually need to obfuscate only part of the tree. Configure paths in bulk, then override individual files with a header directive:

new TypeScriptObfuscatorPlugin({
  projectRoot: __dirname,
  include: ["src/core/**", "src/engine/**"], // obfuscate only these
  exclude: ["src/legacy/**", "src/generated/**"], // never obfuscate these
})
/// <ts-obfuscate /> // skip this file (no argument means off)
/// <ts-obfuscate off /> // same, explicit form
/// <ts-obfuscate on /> // force obfuscation (overrides exclude)

Rules:…

Description from the npm listing.

  • webpack
  • webpack-plugin
  • typescript
  • ts-loader
  • obfuscator
  • obfuscation
  • class
  • rename

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-typescript-obfuscator weekly downloads on npm, last 90 days: 108 weekly downloads as of Dec 5, 2026.webpack-typescript-obfuscatorWeekly downloads on npm · Last 90 days108downloads / week05001K1.5K2KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
webpack-typescript-obfuscator weekly downloads on npm, last 90 days: 108 weekly downloads as of Dec 5, 2026.

7/30/90-day growth

webpack-typescript-obfuscator weekly downloads growth on npm: -20.0% over 7 days, 30-day growth unavailable, 90-day growth unavailable.webpack-typescript-obfuscatorWeekly downloads growth on npm108downloads / week now7-day growth-27 weekly downloads-20.0%30-day growth+108 weekly downloadsInsufficient history90-day growth+108 weekly downloadsInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
webpack-typescript-obfuscator weekly downloads growth on npm: -20.0% over 7 days, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

webpack-typescript-obfuscator npm ranking history: currently #2613 (by weekly downloads).webpack-typescript-obfuscatornpm ranking · by weekly downloads · Last 90 days#2613current rank#1400#1600#1800#2000#2200#2400#2600#2800Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankNov 11, 2026 – Dec 6, 2026 · 26 observations · Updated Dec 5, 2026pluginstats.com
webpack-typescript-obfuscator npm ranking history: currently #2613 (by weekly downloads).

Listing placement

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

Listing placement

Webpack plugins349 listings · 18 pages · page 9, #17 (overall #177)
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 (142)
Recent weekly downloads observations for webpack-typescript-obfuscator
Date (UTC)Weekly downloadsChange vs. previous
108+8
100+2
98-11
109+4
105-15
120-17
137+2
135+5
130-310
440-7
447-42
489-787
1,2760
1,276—

Similar npm Webpack plugins plugins

All 20 webpack-typescript-obfuscator 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-typescript-obfuscator. First seen Nov 11, 2026; last successful collection Dec 6, 2026. See the methodology.