Skip to content
PluginStats

vite-plugin-plain-text weekly downloads statistics

By zheeeng · npm · Vite plugins

A Vite plugin transforms the rule-matched file as plain text.

View on npm Fresh · Dec 6, 2026

vite-plugin-plain-text has 9,040 recorded weekly downloads on npm, an increase of 8.5% over the past 30 days, ranking #1311 of 3,247 tracked listings.

Weekly downloads
9,040
Official API · Dec 5, 2026
7-day growth
+31.2%
+2.1K weekly downloads
30-day growth
+8.5%
+711 weekly downloads
90-day growth
+76.5%
+3.9K weekly downloads
Rank
#1311
▲ 68 in 7 days

About vite-plugin-plain-text

vite-plugin-plain-text

NPM

publish workflow npm version

A Vite plugin that transforms matched files into plain text.

Installation

pnpm i -D vite-plugin-plain-text (or npm/yarn)

Usage Example

Assume we are going to transform these files:

  1. The project's LICENSE file
  2. Textbox
  3. .glsl file

into plain text.

// vite.config.(t|j)s

import { defineConfig } from 'vite';

import plainText from 'vite-plugin-plain-text';

export default defineConfig({
  plugins: [
    // passing regular expression or glob matcher
    plainText([/\/LICENSE$/, '**/*.text', /\.glsl$/]),
  ],
});
// component.js

import { plainText as LICENSE } from '../LICENSE'
import { plainText as Lorem } from '../lorem-ipsum.text'
import { plainText as Siren } from '../siren.glsl'

console.log(LICENSE)
console.log(Lorem)
console.log(Siren)

Advanced Usage

Options Reference
type PlainTextOptions = {
  namedExport?: string | false,
  dtsAutoGen?: boolean,
  distAutoClean?: boolean,
}
Enable Default Export

Use the plainTextOptions.namedExport option to configure the named exported variable. To enable the default export, pass false, '', or undefined.

// vite.config.(t|j)s

import { defineConfig } from 'vite';
import plainText from 'vite-plugin-plain-text';

export default defineConfig({
  plugins: [
    plainText(
      [/\/LICENSE$/, '**/*.text', /\.glsl$/],
      { namedExport: false },
    ),
  ],
});
// component.js

import LICENSE from '../LICENSE'
import Lorem from '../lorem-ipsum.text'
import Siren from '../siren.glsl'

console.log(LICENSE)
console.log(Lorem)
console.log(Siren)
Type Safety
Adding Module Declarations Manually
// vite-env.d.ts
declare module '*/LICENSE' {
    export const plainText: string
}
declare module '*.text' {
    export const plainText: string
}
declare module '*.glsl' {
    export const plainText: string
}
Generate the declaration automatically
  1. plainTextOptions.dtsAutoGen generates .dts files for matched files.
  2. plainTextOptions.dtsAutoClean cleans up these .dts files after the vite plugin starts up each time.
import { defineConfig } from 'vite';
import plainText from 'vite-plugin-plain-text';

export default defineConfig({
  plugins: [
    plainText(
      [/\/LICENSE$/, '**/*.text', /\.glsl$/],
      { namedExport: false, dtsAutoGen: true, distAutoClean: true },
    ),
  ],
});

License

MIT

Alternative

Virtual asset Loader: vite-plugin-virtual-plain-text

Description from the npm listing.

  • vite
  • plugin
  • vite-plugin
  • plain text

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-plain-text weekly downloads on npm, last 90 days: 9,040 weekly downloads as of Dec 5, 2026, +76.5% over 90 days.vite-plugin-plain-textWeekly downloads on npm · Last 90 days9,040downloads / week+76.5% over 90 days02K4K6K8K10KSep 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-plain-text weekly downloads on npm, last 90 days: 9,040 weekly downloads as of Dec 5, 2026, +76.5% over 90 days.

7/30/90-day growth

vite-plugin-plain-text weekly downloads growth on npm: +31.2% over 7 days, +8.5% over 30 days, +76.5% over 90 days.vite-plugin-plain-textWeekly downloads growth on npm9,040downloads / week now7-day growth+2,148 weekly downloads+31.2%30-day growth+711 weekly downloads+8.5%90-day growth+3,919 weekly downloads+76.5%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-plain-text weekly downloads growth on npm: +31.2% over 7 days, +8.5% over 30 days, +76.5% over 90 days.

Ranking history

vite-plugin-plain-text npm ranking history: currently #1311 (by weekly downloads).vite-plugin-plain-textnpm ranking · by weekly downloads · Last 90 days#1311current rank#1150#1200#1250#1300#1350#1400#1450Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 40 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-plain-text npm ranking history: currently #1311 (by weekly downloads).

Listing placement

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

Listing placement

Vite plugins300 listings · 15 pages · page 12, #18 (overall #238)
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-plain-text
Date (UTC)Weekly downloadsChange vs. previous
9,040+366
8,674+805
7,869+945
6,924+609
6,315-429
6,744+79
6,665-227
6,892-148
7,040-609
7,649-549
8,198+62
8,136+489
7,647-31
7,678—

Similar npm Vite plugins plugins

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