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 · Oct 18, 2026

vite-plugin-swc-transform has 6,738 recorded weekly downloads on npm, a decrease of 38.8% over the past 30 days, ranking #1063 of 2,322 tracked listings.

Weekly downloads
6,738
Official API · Oct 18, 2026
7-day growth
-17.3%
-1.4K weekly downloads
30-day growth
-38.8%
-4.3K weekly downloads
90-day growth
-46.4%
-5.8K weekly downloads
Rank
#1063
Among tracked npm listings

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: 6,738 weekly downloads as of Oct 18, 2026, -46.4% over 90 days.vite-plugin-swc-transformWeekly downloads on npm · Last 90 days6,738downloads / week-46.4% over 90 days02K4K6K8K10K12K14K16K18KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
vite-plugin-swc-transform weekly downloads on npm, last 90 days: 6,738 weekly downloads as of Oct 18, 2026, -46.4% over 90 days.

7/30/90-day growth

vite-plugin-swc-transform weekly downloads growth on npm: -17.3% over 7 days, -38.8% over 30 days, -46.4% over 90 days.vite-plugin-swc-transformWeekly downloads growth on npm6,738downloads / week now7-day growth-1,405 weekly downloads-17.3%30-day growth-4,266 weekly downloads-38.8%90-day growth-5,839 weekly downloads-46.4%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
vite-plugin-swc-transform weekly downloads growth on npm: -17.3% over 7 days, -38.8% over 30 days, -46.4% over 90 days.

Ranking history

vite-plugin-swc-transform npm ranking history: currently #1063 (by weekly downloads).vite-plugin-swc-transformnpm ranking · by weekly downloads · Last 90 days#1063current rank#1060#1070#1080#1090#1100#1110#1120Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 18, 2026 – Oct 20, 2026 · 3 observations · Updated Oct 18, 2026pluginstats.com
vite-plugin-swc-transform npm ranking history: currently #1063 (by weekly downloads).

Listing placement

All npm2,320 listings · 116 pages · 1,161 shown · page 54, #5 (overall #1,065)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins253 listings · 13 pages · page 10, #5 (overall #185)
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 (122)
Recent weekly downloads observations for vite-plugin-swc-transform
Date (UTC)Weekly downloadsChange vs. previous
6,738+2.1K
4,668-510
5,178+1.2K
4,017-1.9K
5,940-1.6K
7,5710
7,571-572
8,143+108
8,035+122
7,913-375
8,288-220
8,508-294
8,802-2.1K
10,903—

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 Oct 20, 2026. See the methodology.