babel-plugin-transform-vite-meta-env

JSON →
library 1.0.3 ·javascript maintenance
verified May 27, 2026

Babel plugin that emulates Vite's import.meta.env functionality for non-Vite environments, such as testing with NodeJS-based runners. Version 1.0.3 is the latest stable release, last updated in April 2021. It transforms import.meta.env.MODE, .BASE_URL, .DEV, .PROD, etc. into process.env references or static values, providing an approximation of Vite's env behavior. Differentiated from alternatives like @rollup/plugin-replace by specifically targeting Vite idioms and supporting a set of predefined env variables. Release cadence is low; part of the babel-vite monorepo. Ships TypeScript types.

total hits 25
actors 8 distinct systems
last hit 4d ago human
Amazonbot
4
MetaBot
4
ByteDance
3
GPTBot
2
Script
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇪🇸 Spain