Skip to content
PluginStats

@cyrus-dev/unplugin-cdn weekly downloads statistics

By cyrus-dev · npm · Webpack plugins

Universal CDN externalization and HTML asset injection plugin for Vite, Webpack, Rspack, Rollup, Rolldown, esbuild, and Farm

View on npm Fresh · Dec 6, 2026

@cyrus-dev/unplugin-cdn has 23 recorded weekly downloads on npm, a change of -32.4% over the past 7 days, ranking #2966 of 3,247 tracked listings.

Weekly downloads
23
Official API · Dec 5, 2026
7-day growth
-32.4%
-11 weekly downloads
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#2966
▼ 281 in 7 days

About @cyrus-dev/unplugin-cdn

@cyrus-dev/unplugin-cdn

English | 简体中文

Universal CDN plugin powered by unplugin. During local development (dev / serve), imports resolve directly from node_modules. During production builds (build), specified packages are excluded from the bundle and automatically injected into HTML via CDN <script> / <link> tags or <script type="importmap">.

Supports Vite, Webpack, Rspack, Rsbuild, Rollup, Rolldown, esbuild, Farm, and Bun.

Installation

pnpm add -D @cyrus-dev/unplugin-cdn

Usage

Vite
// vite.config.ts
import cdn from "@cyrus-dev/unplugin-cdn/vite"
import { defineConfig } from "vite"

export default defineConfig({
  plugins: [
    cdn({
      provider: "jsdelivr",
      format: "umd",
      modules: [
        "react",
        "react-dom",
        "shadcn",
        "tanstack-*",
        "zustand",
        "zod",
        "supabase",
        "motion",
      ],
    }),
  ],
})
Webpack / Rspack
// webpack.config.js or rspack.config.js
import cdn from "@cyrus-dev/unplugin-cdn/webpack" // or "@cyrus-dev/unplugin-cdn/rspack"

export default {
  mode: "production",
  plugins: [
    cdn({
      modules: ["react", "react-dom", "ant-design", "dayjs"],
    }),
  ],
}
Rsbuild
// rsbuild.config.ts
import cdn from "@cyrus-dev/unplugin-cdn/rsbuild"
import { defineConfig } from "@rsbuild/core"

export default defineConfig({
  plugins: [
    cdn({
      modules: ["react", "react-dom", "recharts"],
    }),
  ],
})
Rollup / Rolldown
// rollup.config.js or rolldown.config.js
import cdn from "@cyrus-dev/unplugin-cdn/rollup" // or "@cyrus-dev/unplugin-cdn/rolldown"

export default {
  plugins: [
    cdn({
      modules: ["lodash", "axios"],
    }),
  ],
}
esbuild / Farm / Bun
import cdnEsbuild from "@cyrus-dev/unplugin-cdn/esbuild"
import cdnFarm from "@cyrus-dev/unplugin-cdn/farm"
import cdnBun from "@cyrus-dev/unplugin-cdn/bun"

Loading Modes (format)

  • "umd" (default): Maps module imports (both default and named exports) to global variables on globalThis via virtual shim modules and injects <script src="..."> and <link rel="stylesheet" href="..."> into HTML before bundle scripts. Modern packages that only publish ESM (such as zustand, zod, @tanstack/*, radix-ui, motion, recharts) automatically fall back to native ESM + importmap.
  • "esm": Marks modules as native ESM externals and injects <script type="importmap"> into HTML (defaults to esm.sh).

Built-in Presets & Group Aliases

Versions are automatically read from your project's installed node_modules/<name>/package.json so the CDN version always matches local development.

Group & Wildcard Presets (Auto-detects installed packages)
Group / PatternExpanded Packages
shadcnradix-ui, @radix-ui/*, clsx, tailwind-merge, class-variance-authority, lucide-react
cnclsx, tailwind-merge, class-variance-authority
tanstack-* / @tanstack/*All installed @tanstack/* packages (@tanstack/react-query, @tanstack/react-router, @tanstack/react-table, @tanstack/react-virtual, @tanstack/react-form, etc.)
ant-designantd, @ant-design/icons
base-ui@base-ui/react, @base-ui-components/react
aria-uireact-aria-components, react-aria, react-stately
supabase@supabase/supabase-js
tailwindcss@tailwindcss/browser
Individual Package Presets
  • Vue Ecosystem: vue, vue-router, pinia, vue-demi, @vueuse/core, @vueuse/shared, element-plus, naive-ui, vant
  • React & State: react, react-dom, react-router, react-router-dom, zustand, immer, swr, ahooks, @tanstack/*
  • UI & Styling: antd, @ant-design/icons, radix-ui, @radix-ui/*, @base-ui/react, react-aria-components, lucide-react, @heroicons/react, clsx, tailwind-merge, class-variance-authority, @tailwindcss/browser
  • Validation, BaaS & Utils: zod, @supabase/supabase-js, nanoid, uuid, axios, lodash, lodash-es, dayjs, moment, date-fns, rxjs
  • Charts, Motion & 3D: recharts, echarts, d3, chart.js, motion, framer-motion, gsap, three, @react-three/fiber, @react-three/drei, pixi.js, konva
  • DOM & Rich Content: jquery, sortablejs, marked, dompurify, highlight.js, katex

Options

OptionTypeDefaultDescription
modules(string | CdnModuleConfig)[]RequiredPackages or preset groups to externalize and load from CDN
provider"jsdelivr" | "unpkg" | "esm.sh" | "cdnjs" | "npmmirror" | string | ((params) => string)"jsdelivr" ("esm.sh" for ESM)CDN provider preset, URL template ({name}, {version}, {path}), or builder function
format"umd" | "esm""umd"Load via UMD globals + <script> or native ESM + importmap
applyboolean | "build" | "serve""build"When to enable CDN replacement
rootstringprocess.cwd()Project root for resolving node_modules
crossorigin"" | "anonymous" | "use-credentials" | false"anonymous"crossorigin attribute on injected HTML tags
injectHtmlbooleantrueAutomatically inject <script> and <link> tags into generated HTML

Description from the npm listing.

  • bun-plugin
  • cdn
  • esbuild-plugin
  • esm
  • esm.sh
  • externals
  • farm-plugin
  • importmap
  • jsdelivr
  • rolldown-plugin
  • rollup-plugin
  • rsbuild-plugin
  • rspack-plugin
  • umd
  • unpkg
  • unplugin
  • vite-plugin
  • webpack-plugin

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

@cyrus-dev/unplugin-cdn weekly downloads on npm, last 90 days: 23 weekly downloads as of Dec 5, 2026.@cyrus-dev/unplugin-cdnWeekly downloads on npm · Last 90 days23downloads / week050100150200250Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@cyrus-dev/unplugin-cdn weekly downloads on npm, last 90 days: 23 weekly downloads as of Dec 5, 2026.

7/30/90-day growth

@cyrus-dev/unplugin-cdn weekly downloads growth on npm: -32.4% over 7 days, 30-day growth unavailable, 90-day growth unavailable.@cyrus-dev/unplugin-cdnWeekly downloads growth on npm23downloads / week now7-day growth-11 weekly downloads-32.4%30-day growth+23 weekly downloadsInsufficient history90-day growth+23 weekly downloadsInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@cyrus-dev/unplugin-cdn weekly downloads growth on npm: -32.4% over 7 days, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

@cyrus-dev/unplugin-cdn npm ranking history: currently #2966 (by weekly downloads).@cyrus-dev/unplugin-cdnnpm ranking · by weekly downloads · Last 90 days#2966current rank#1800#2000#2200#2400#2600#2800#3000Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankNov 25, 2026 – Dec 6, 2026 · 12 observations · Updated Dec 5, 2026pluginstats.com
@cyrus-dev/unplugin-cdn npm ranking history: currently #2966 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 149, #8 (overall #2,968)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins349 listings · 18 pages · page 15, #15 (overall #295)
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 (128)
Recent weekly downloads observations for @cyrus-dev/unplugin-cdn
Date (UTC)Weekly downloadsChange vs. previous
23+6
17-3
20-1
21-3
24-7
31-3
340
34-1
35-4
39-11
50-4
54-195
249+5
244—

Similar npm Webpack plugins plugins

All 20 @cyrus-dev/unplugin-cdn 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/@cyrus-dev/unplugin-cdn. First seen Nov 25, 2026; last successful collection Dec 6, 2026. See the methodology.