Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vite-plugin-env-compatible

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-env-compatible

Environment Variables Compatible

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
32K
decreased by-52.43%
Maintainers
1
Weekly downloads
 
Created
Source

vite-plugin-env-compatible

inject to process.env like vue-cli or create-react-app and also define client process.env.XXX for you.

wakatime NPM Publish downloads npm version License: MIT

Motivation

  • vite expose env to import.meta.env.PREFIX_XXX, but not loaded to process.env like vue-cli or create-react-app.
  • this plugin support setting prefix like VUE_APP_ or REACT_APP_ and loaded to process.env(support by vite@2.5.1).
  • built-in with vue-cli-plugin-vite just for compatibility.

Usage

yarn add vite-plugin-env-compatible
// vite.config.ts
import env from 'vite-plugin-env-compatible'

// @see https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    // ...other plugins
    env(/* options */)
  ],
})

Options

Underlying

  • dotenv & dotenv-expand
  • vite

Further

Keywords

FAQs

Package last updated on 01 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc