Skip to content
PluginStats

vite-plugin-legacy-swc weekly downloads statistics

By CyanSalt · npm · Vite plugins

Provides legacy browsers support for the production build with SWC

View on npm Outdated · Oct 23, 2026

vite-plugin-legacy-swc has 7,386 recorded weekly downloads on npm, an increase of 115% over the past 30 days, ranking #1394 of 3,247 tracked listings.

Weekly downloads
7,386
Official API · Dec 5, 2026
7-day growth
+117%
+4K weekly downloads
30-day growth
+115%
+3.9K weekly downloads
90-day growth
-57.8%
-10.1K weekly downloads
Rank
#1394
▲ 233 in 7 days

About vite-plugin-legacy-swc

vite-plugin-legacy-swc

npm

Provides legacy browsers support for the production build with SWC.

This package is intended to replace @vitejs/plugin-legacy in performance-sensitive situations. It is basically an implementation of vitejs/vite#4105.

As for performance, for reference, the results of my tests on a huge private project (with { modernPolyfills: true }) are as follows:

Without legacy browsers supportWith @vitejs/plugin-legacyWith vite-plugin-legacy-swc
CPU Time146.45s697.82s295.04s
JS Asset Size*9.5M22M21M
JS Asset Size Without Legacy Chunks9.5M9.6M9.6M

Compared to @vitejs/plugin-legacy, vite-plugin-legacy-swc saves 58% of time and 4% of JS asset size.

* In my current tests, @vitejs/plugin-legacy does not generate source maps for legacy chunks correctly, so the asset size statistics exclude the source maps.


Vite's minimum browser support target is Native ESM, native ESM dynamic import, and import.meta. This plugin provides support for legacy browsers that do not support those features when building for production.

By default, this plugin will:

  • Generate a corresponding legacy chunk for every chunk in the final bundle, transformed with @swc/core and emitted as SystemJS modules (code splitting is still supported!).

  • Generate a polyfill chunk including SystemJS runtime, and any necessary polyfills determined by specified browser targets and actual usage in the bundle.

  • Inject <script nomodule> tags into generated HTML to conditionally load the polyfills and legacy bundle only in browsers without widely-available features support.

  • Inject the import.meta.env.LEGACY env variable, which will only be true in the legacy production build, and false in all other cases.

Usage

// vite.config.js
import legacy from 'vite-plugin-legacy-swc'

export default {
  plugins: [
    legacy({
      targets: ['defaults', 'not IE 11'],
    }),
  ],
}

Options

targets

[!NOTE] Some browserslist queries are not supported in targets and modernTargets since SWC uses browserslist-rs. See Limitations.

modernTargets
polyfills
  • Type: boolean | string[]

  • Default: true

    By default, a polyfills chunk is generated based on the target browser ranges and actual usage in the final bundle (detected via @swc/core's mode: 'usage').

    Set to a list of strings to explicitly control which polyfills to include. See Polyfill Specifiers for details.

    Set to false to avoid generating polyfills and handle it yourself (will still generate legacy chunks with syntax transformations).

additionalLegacyPolyfills
  • Type: string[]

    Add custom imports to the legacy polyfills chunk. Since the usage-based polyfill detection only covers ES language features, it may be necessary to manually specify additional DOM API polyfills using this option.

additionalModernPolyfills
  • Type: string[]

    Add custom imports to the modern polyfills chunk. Since the usage-based polyfill detection only covers ES language features, it may be necessary to manually specify additional DOM API polyfills using this option.

modernPolyfills

Description from the npm listing.

  • vite
  • vite-plugin
  • legacy
  • swc

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-legacy-swc weekly downloads on npm, last 90 days: 7,386 weekly downloads as of Dec 5, 2026, -57.8% over 90 days.vite-plugin-legacy-swcWeekly downloads on npm · Last 90 days7,386downloads / week-57.8% over 90 days02K4K6K8K10K12K14KSep 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-legacy-swc weekly downloads on npm, last 90 days: 7,386 weekly downloads as of Dec 5, 2026, -57.8% over 90 days.

7/30/90-day growth

vite-plugin-legacy-swc weekly downloads growth on npm: +117% over 7 days, +115% over 30 days, -57.8% over 90 days.vite-plugin-legacy-swcWeekly downloads growth on npm7,386downloads / week now7-day growth+3,978 weekly downloads+117%30-day growth+3,943 weekly downloads+115%90-day growth-10,133 weekly downloads-57.8%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-legacy-swc weekly downloads growth on npm: +117% over 7 days, +115% over 30 days, -57.8% over 90 days.

Ranking history

vite-plugin-legacy-swc npm ranking history: currently #1394 (by weekly downloads).vite-plugin-legacy-swcnpm ranking · by weekly downloads · Last 90 days#1394current rank#1250#1300#1350#1400#1450#1500#1550#1600#1650Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 20 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-legacy-swc npm ranking history: currently #1394 (by weekly downloads).

Listing placement

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

Listing placement

Vite plugins300 listings · 15 pages · page 13, #14 (overall #254)
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-legacy-swc
Date (UTC)Weekly downloadsChange vs. previous
7,386-133
7,519+998
6,521+809
5,712+1.1K
4,647+427
4,220+649
3,571+163
3,408-56
3,464+310
3,154+228
2,926-196
3,122-76
3,198-58
3,256—

Similar npm Vite plugins plugins

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