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

  • 0.0.1
  • Source
  • npm
  • Socket score

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

@nibfe/vite-plugin-env-compatible

为 Vite 项目增加类似 Vue CLI 的环境变量注入模式

用法

  • 执行 yarn add @nibfe/vite-plugin-env-compatible

技术选型

  • dotenv & dotenv-expand

说明

  • vite 官方的环境变量相关功能其实已经基于 dotenv & dotenv-expand 做了,但是默认仅将 VITE_ 开头的环境变量注入 client 代码,且采用最新的 es module 的 import.meta.env 来挂载
  • 本插件支持设置要注入的环境变量前缀(默认 VUE_APP_ 来兼容 vue-cli,用户可以设置为任意的,例如 REACT_APP_ 等),且注入到 process.env

Keywords

FAQs

Package last updated on 18 Feb 2021

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