MCPcopy Index your code
hub / github.com/IndexXuan/vite-plugin-env-compatible

github.com/IndexXuan/vite-plugin-env-compatible @v1.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.1 ↗ · + Follow
7 symbols 16 edges 5 files 0 documented · 0% 3 cross-repo links updated 1y agov1.1.1 · 2021-08-27★ 743 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

vite-plugin-env-compatible

inject to process.env like vue-cli or create-react-app

wakatime NPM Publish downloads npm version License: MIT

Motivation

  • vite expose VITE_XXX to import.meta.env.VITE_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
  • just for compatibility

Usage

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

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

Options

Underlying

  • dotenv & dotenv-expand
  • vite

Further

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 5
Interface 2

Languages

TypeScript100%

Modules by API surface

src/lib/env.ts4 symbols
src/index.ts2 symbols
src/lib/options.ts1 symbols

For agents

$ claude mcp add vite-plugin-env-compatible \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page