Skip to content
PluginStats

vite-plugin-runtime weekly downloads statistics

By flexbase-eng · npm · Vite plugins

Vite plugin that enables configuring runtime environment variables when building

View on npm Fresh · Oct 17, 2026

vite-plugin-runtime has 6,361 recorded weekly downloads on npm, a decrease of 18.3% over the past 30 days.

It ranks #1022 of 2,251 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by -23.7%.

PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.

Weekly downloads
6,361
Official API · Oct 17, 2026
7-day growth
-40.1%
-4.3K weekly downloads
30-day growth
-18.3%
-1.4K weekly downloads
90-day growth
-23.7%
-2K weekly downloads
Rank
#1022
Among tracked npm listings

About vite-plugin-runtime

vite-plugin-runtime

Inject runtime environment variables and html based on the vite mode.

Installation

or

runtimeEnv

Summary

This plugin allows build toolchains to inject variables at compile time instead of relying on multiple .env.* environment dotenv files. This is especially useful for values that need to be managed externally from source code.

This plugin replaces usage of import.meta.env.VITE_* with import.meta.env.*.

| vite | vite-plugin-runtime |

| import.meta.env.VITE_APP_KEY | import.meta.env.APP_KEY |

.env file

| vite | vite-plugin-runtime |

| VITE_APP_KEY=some value | APP_KEY=some value |

During the build this plugin will convert all occurences of import.meta.env.* to window.env.*

| Code | Runtime |

| import.meta.env.APP_KEY | window.env.APP_KEY |

Usage

vite.config

The plugin options can be injected in the constructor or as a separate object on the vite config object.

Configuration

name

This is the name of the object attached to the window instance. Default is env.

outputs window.customName.*

generateTypes

Specificies whether to generate typescript types for import.meta.env. Default is false.

generatedTypesPath

The path to generate typescript types. Only takes affect if generateTypes is true. Default is process.cwd()

generatedTypesPath combined with generateTypes will create a type definition file env.d.ts:

injectHtml

Specifies whether to inject an env loading script into index.html. Defaults to true.

When true the plugin will inject

into the index.html section.

The generated script will resemble:

envsubstTemplate

Specifies whether to create an envsubst template file at build time. Defaults to false.

When true the plugin will create the following template file:

runtimeHtml

Summary

This plugin allows an easy way to inject html into index.html at compile time based on the vite mode. This is useful for scripts like google tag manager that should only be loaded for certain environments like production.

Usage

vite.config

The plugin options can be injected in the constructor or as a separate object on the vite config object.

Configuration

see HtmlTagDescriptor

Description from the npm listing.

  • flexbase
  • flex
  • vite
  • vite-plugin

Where vite-plugin-runtime sits in the listing

Each band is one page of 20. Weekly downloads on a log 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.

All npm2,248 listings · 113 pages · page 52, #2 (overall #1022)
All npm: every listing in weekly downloads order
PNG SVG
Vite plugins250 listings · 13 pages · page 9, #16 (overall #176)
Vite plugins: every listing in weekly downloads order
PNG SVG

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

vite-plugin-runtime weekly downloads on npm, last 90 days: 6,361 weekly downloads as of Oct 17, 2026, -23.7% over 90 days.vite-plugin-runtimeWeekly downloads on npm · Last 90 days6,361downloads / week-23.7% over 90 days02K4K6K8K10K12K14K16KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 20, 2026 – Oct 17, 2026 · 90 observations · Updated Oc…pluginstats.com
vite-plugin-runtime weekly downloads on npm, last 90 days: 6,361 weekly downloads as of Oct 17, 2026, -23.7% over 90 days.
PNG SVG

7/30/90-day growth

vite-plugin-runtime weekly downloads growth on npm: -40.1% over 7 days, -18.3% over 30 days, -23.7% over 90 days.vite-plugin-runtimeWeekly downloads growth on npm6,361downloads / week now7-day growth-4,264 weekly downloads-40.1%30-day growth-1,424 weekly downloads-18.3%90-day growth-1,972 weekly downloads-23.7%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
vite-plugin-runtime weekly downloads growth on npm: -40.1% over 7 days, -18.3% over 30 days, -23.7% over 90 days.
PNG SVG

Ranking history

vite-plugin-runtime npm ranking history: currently #1022 (by weekly downloads).vite-plugin-runtimenpm ranking · by weekly downloads · Last 90 days#1022current rank#1020#1021#1022#1023#1024Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18rankOct 18, 2026 – Oct 18, 2026 · 1 observations · Updated Oct 17, 2026pluginstats.com
vite-plugin-runtime npm ranking history: currently #1022 (by weekly downloads).
PNG SVG

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.

Recent observations

Full history (121)
Recent weekly downloads observations for vite-plugin-runtime
Date (UTC)Weekly downloadsChange vs. previous
6,361-509
6,870+1.5K
5,341-2.2K
7,517-2.4K
9,9500
9,950-471
10,421-204
10,625-575
11,200-744
11,944-781
12,725-929
13,654-2.2K
15,866+923
14,943—

Similar npm Vite plugins plugins

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-runtime. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.