Skip to content
PluginStats

vite-plugin-swc-transform weekly downloads statistics

By ziir · npm · Vite plugins

Vite plugin for transforming source files with SWC.

View on npm Fresh · Dec 6, 2026

vite-plugin-swc-transform has 8,542 recorded weekly downloads on npm, a decrease of 45.9% over the past 30 days, ranking #1334 of 3,247 tracked listings.

Weekly downloads
8,542
Official API · Dec 5, 2026
7-day growth
+6.5%
+520 weekly downloads
30-day growth
-45.9%
-7.2K weekly downloads
90-day growth
-19.3%
-2K weekly downloads
Rank
#1334
▼ 12 in 7 days

About vite-plugin-swc-transform

vite-plugin-swc-transform npm

Transform your TypeScript / JavaScript source files with SWC within your Vite build process.

Read the blog post relating the story which led to the creation of this plugin: TypeScript Legacy Experimental Decorators with Type Metadata in 2023.

Installation

npm i --save-dev vite-plugin-swc-transform

Usage

Note: This package is ESM-only.

Default SWC transform options
import { defineConfig } from "vite";
import swc from "vite-plugin-swc-transform";

export default defineConfig({
  plugins: [swc()],
});

The plugin will default to the following options:

{
  include: /\.tsx?$/,
  exclude: /node_modules/,

  swcOptions: {
    {
      swcrc: false,
      configFile: false,
      inputSourceMap: false,
      sourceMaps: true
    }
  },

  suppressLegacyDecoratorNoExplicitUDFCFWarning: false
}
Transform TypeScript Legacy / Experimental Decorators with Metadata

Example use case: build a package leveraging Nest style dependency injection with Reflect.metadata.

import { defineConfig } from "vite";
import swc from "vite-plugin-swc-transform";

export default defineConfig({
  plugins: [
    swc({
      swcOptions: {
        jsc: {
          target: "es2022",
          transform: {
            legacyDecorator: true,
            decoratorMetadata: true,
            useDefineForClassFields: false,
          },
          // externalHelpers: true,
        },
      },
    }),
  ],
});

Notes:

  • should be used alongside "compilerOptions.experimentalDecorators": true & "compilerOptions.emitDecoratorMetadata": true in your tsconfig.json.
  • swcOptions.jsc.externalHelpers: true is recommended when transforming TypeScript Legacy / Experimental Decorators with Metadata to avoid helpers duplication & limit bundle size impact.
    • adding the @swc/helpers dependency is then necessary.

The above (without external helpers) will yield the following SWC transform options:

{
  swcrc: false,
  configFile: false,
  inputSourceMap: false,
  sourceMaps: true,
  jsc: {
    target: 'es2022',
    transform: {
      legacyDecorator: true,
      decoratorMetadata: true,
      useDefineForClassFields: false
    },
    keepClassNames: true,
    parser: {
      decorators: true,
      decoratorsBeforeExport: true,
      syntax: 'typescript'
    }
  }
}
Notes
  • This plugin does not read, validate or infer from the project's tsconfig.json configuration.
  • This plugin is intended to be used with an inlined swcOptions SWC configuration object.
'useDefineForClassFields' warning
[vite-plugin-swc-transform] SWC option 'jsc.transform.legacyDecorator' enabled without an explicit 'jsc.transform.useDefineForClassFields' value.
To remove this warning, either:
 - unset or disable SWC option 'jsc.transform.legacyDecorator' if not needed
 - set an explicit value for SWC option 'jsc.transform.useDefineForClassFields: boolean'
 - pass vite-plugin-swc-transform option 'suppressLegacyDecoratorNoExplicitUDFCFWarning: true'

Learn more;

Please open an issue if you think this is incorrect or should be improved.

Description from the npm listing.

  • vite
  • plugin
  • vite-plugin
  • swc
  • transform
  • typescript
  • decorator
  • metadata
  • reflect
  • nest
  • typeorm
  • dependency injection

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

vite-plugin-swc-transform weekly downloads on npm, last 90 days: 8,542 weekly downloads as of Dec 5, 2026, -19.3% over 90 days.vite-plugin-swc-transformWeekly downloads on npm · Last 90 days8,542downloads / week-19.3% over 90 days02K4K6K8K10K12K14K16K18KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
vite-plugin-swc-transform weekly downloads on npm, last 90 days: 8,542 weekly downloads as of Dec 5, 2026, -19.3% over 90 days.

7/30/90-day growth

vite-plugin-swc-transform weekly downloads growth on npm: +6.5% over 7 days, -45.9% over 30 days, -19.3% over 90 days.vite-plugin-swc-transformWeekly downloads growth on npm8,542downloads / week now7-day growth+520 weekly downloads+6.5%30-day growth-7,246 weekly downloads-45.9%90-day growth-2,046 weekly downloads-19.3%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-swc-transform weekly downloads growth on npm: +6.5% over 7 days, -45.9% over 30 days, -19.3% over 90 days.

Ranking history

vite-plugin-swc-transform npm ranking history: currently #1334 (by weekly downloads).vite-plugin-swc-transformnpm ranking · by weekly downloads · Last 90 days#1334current rank#1000#1050#1100#1150#1200#1250#1300#1350Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-swc-transform npm ranking history: currently #1334 (by weekly downloads).

Listing placement

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

Listing placement

Vite plugins300 listings · 15 pages · page 13, #6 (overall #246)
Vite 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 vite-plugin-swc-transform
Date (UTC)Weekly downloadsChange vs. previous
8,542+139
8,403+384
8,019+476
7,543-56
7,599-321
7,920-133
8,053+31
8,022-326
8,348-1.3K
9,607-3K
12,573-1.8K
14,395-1.2K
15,622-891
16,513—

Similar npm Vite plugins plugins

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