Skip to content
PluginStats

vite-plugin-font weekly downloads statistics

By KonghaYao · npm · Webpack plugins

An automatic Web Font optimization plugin that supports many platforms such as Vite, Next, Nuxt, and more.

View on npm Fresh · Dec 6, 2026

vite-plugin-font has 2,874 recorded weekly downloads on npm, a decrease of 8.3% over the past 30 days, ranking #1755 of 3,247 tracked listings.

Weekly downloads
2,874
Official API · Dec 5, 2026
7-day growth
+5.1%
+140 weekly downloads
30-day growth
-8.3%
-260 weekly downloads
90-day growth
+92.2%
+1.4K weekly downloads
Rank
#1755
▼ 70 in 7 days

About vite-plugin-font

🔠 vite-plugin-font 8.0 ⚡

Package version vite-plugin-font 8.0.0, released in lockstep with cn-font-split 8.0.0 (the single version source is the root Cargo.toml).

中文 | English

Developed and supported by the Chinese WebFont Project, vite-plugin-font is a powerful and simple Vite font build tool that can split large fonts into Webfonts. It is powered by cn-font-split for Rust-native level build speed.

We provide an Extremely lightweight optimization solution for first-screen optimization and a full-scale optimization for large text sites, achieving extreme optimization of Chinese fonts in the front-end toolchain.

⚡ Features

  1. ⚡ 50% faster speed, no fear of lag
  2. ⚙️ Automatic CJK (Chinese, Japanese, Korean) font splitting, extremely fast on-demand loading
  3. 🚀 Automatically optimizes the first screen based on characters used in your project
  4. 🔄 Automatically converts fonts to woff2 format, no need to worry about size issues
  5. 🌐 Automatically adds local adaptation, reduces cumulative content shifts, SSR support
  6. 📤 Exports font information, supports tree shaking optimization
  7. 🎨 Pure CSS, no runtime data, multi-platform compatibility
  8. 📦 Automatically reduces Chinese CLS offset
TypeVite, Astro, QwikNuxtNextWebpack, Rspack
Full-scale optimization✅✅✅✅
Extremely lightweight optimization✅✅✅✅
  1. Full-scale optimization is suitable for blogs, documentation websites, which require a large amount of uncertain text. It can achieve full-scale font rendering and has excellent cache performance when combined with CDN.
  2. Extremely lightweight optimization is suitable for official websites, promotional web pages, etc., where quick rendering is required. It collects the characters used in your code and only loads these characters, providing excellent rendering performance. The required font size is approximately 10% of full-scale optimization.

📦 Install

# 国内请设置环境变量, windows 用 set
export CN_FONT_SPLIT_GH_HOST=https://ik.imagekit.io/github
# set CN_FONT_SPLIT_GH_HOST=https://ik.imagekit.io/github # windows
npm i -D vite-plugin-font
import { css, fontFamilyFallback } from '../demo/public/SmileySans-Oblique.ttf';
document.body.style.fontFamily = `"${css.family}", ` + fontFamilyFallback;

✨ Config

Vite

Almost all frameworks that use Vite as the underlying compilation framework can use vite-plugin-font by defining plugins.

// vite.config.js
import { defineConfig } from 'vite';
import Font from 'vite-plugin-font';
export default defineConfig({
    plugins: [Font.vite()],
});
Nuxt
// https://nuxt.com/docs/api/configuration/nuxt-config
import font from 'vite-plugin-font';
export default defineNuxtConfig({
    devtools: { enabled: false },
    vite: {
        plugins: [font.vite({})],
    },
    compatibilityDate: '2024-10-26',
});
Next
// next.config.mjs
/** @type {import('next').NextConfig} */
const nextConfig = {
    webpack: (config, options) => {
        config.plugins.push(viteFont.webpack());
        return config;
    },
};

export default nextConfig;
Webpack
// webpack.config.js or rspack.config.js
const path = require('path');

module.exports = {
    plugins: [viteFont.webpack()],
};
Rsbuild

Thanks to @SamuNatsu for the addition.

TS Type Configuration

export default defineConfig({
  // ...
  tools: {
    bundlerChain(chain, { CHAIN_ID }) {
      chain.module.rule(CHAIN_ID.RULE.FONT).exclude.add(/\.(ttf|otf)$/);  // Require RsBuild not to process .ttf files
    },
    rspack: {
      plugins: [pluginFont.rspack()],  // Register plugin in RsPack
    },
  },
  // ...
});

🚀 Usage

// Automatically injects CSS to import fonts and supports tree shaking optimization of font information!
import { css } from '../../demo/public/SmileySans-Oblique.ttf'; // Directly import font file
console.log(css.family, css.weight); // You can get CSS-related data here

export const App = () => {
    return (
        <div
            style={{
                fontFamily: css.family,
            }}
        ></div>
    );
};

Extremely Lightweight Optimization

Extremely lightweight optimization is suitable for official websites, promotional web pages, etc., where quick rendering is required. It collects the characters used in your code and only loads these characters, providing excellent rendering performance.

Add scanFiles, the way to add it for Nuxt and Webpack is slightly different, but both are adding scan files to the options.

// vite.config.js
import { defineConfig } from 'vite';
import Font from 'vite-plugin-font';
export default defineConfig({
    plugins: [
        Font.vite({
            scanFiles: ['src/**/*.{vue,ts,tsx,js,jsx}'],
        }),
    ],
});

Add ?subsets to your link

// Automatically injects CSS to import fonts and supports tree shaking optimization of font information!
- import { css } from '../../demo/public/SmileySans-Oblique.ttf';
+ import { css } from '../../demo/public/SmileySans-Oblique.ttf?subsets';
console.log(css.family, css.weight); // You can get CSS-related data here…

Description from the npm listing.

  • vite
  • vite-plugin
  • nuxt
  • nuxt-plugin
  • next
  • next-plugin
  • webpack
  • webpack-plugin
  • web-font
  • webfont
  • vue
  • react
  • converter
  • performance
  • wasm
  • woff2
  • ttf
  • otf
  • opentype-fonts
  • font-subsetter

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-font weekly downloads on npm, last 90 days: 2,874 weekly downloads as of Dec 5, 2026, +92.2% over 90 days.vite-plugin-fontWeekly downloads on npm · Last 90 days2,874downloads / week+92.2% over 90 days01K2K3K4K5KSep 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-font weekly downloads on npm, last 90 days: 2,874 weekly downloads as of Dec 5, 2026, +92.2% over 90 days.

7/30/90-day growth

vite-plugin-font weekly downloads growth on npm: +5.1% over 7 days, -8.3% over 30 days, +92.2% over 90 days.vite-plugin-fontWeekly downloads growth on npm2,874downloads / week now7-day growth+140 weekly downloads+5.1%30-day growth-260 weekly downloads-8.3%90-day growth+1,379 weekly downloads+92.2%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-font weekly downloads growth on npm: +5.1% over 7 days, -8.3% over 30 days, +92.2% over 90 days.

Ranking history

vite-plugin-font npm ranking history: currently #1755 (by weekly downloads).vite-plugin-fontnpm ranking · by weekly downloads · Last 90 days#1755current rank#400#600#800#1000#1200#1400#1600#1800Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-font npm ranking history: currently #1755 (by weekly downloads).

Listing placement

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

Listing placement

Webpack plugins349 listings · 18 pages · page 3, #10 (overall #50)
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 (592)
Recent weekly downloads observations for vite-plugin-font
Date (UTC)Weekly downloadsChange vs. previous
2,874+89
2,785-158
2,943+176
2,767-1
2,768+72
2,696-9
2,705-29
2,734-90
2,824+84
2,740-49
2,789-83
2,872-132
3,004-166
3,170—

Similar npm Webpack plugins plugins

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