# envkey-webpack-plugin

> Use envkey as a webpack plugin.

Latest version **2.5.1** (published 2023-09-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install envkey-webpack-plugin
pnpm add envkey-webpack-plugin
yarn add envkey-webpack-plugin
bun add envkey-webpack-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.5.1 |
| Published | 2023-09-01 |
| First published | 2017-07-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 673 |
| Author | EnvKey |
| Maintainers | envkey |
| Keywords | webpack, secrets, configuration, environment variables, security, encryption |

## Links

- npm: https://www.npmjs.com/package/envkey-webpack-plugin
- Repository: https://github.com/envkey/envkey
- Homepage: https://github.com/envkey/envkey/public/sdks/languages-and-frameworks/envkey-webpack-plugin#readme
- Issues: https://github.com/envkey/envkey/issues
- npm.io page: https://npm.io/package/envkey-webpack-plugin

## Dependencies (1)

- [envkey](https://npm.io/package/envkey.md) ^2.5.1

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 2.5.1 (latest) — 2023-09-01
- 2.4.0 — 2023-05-26
- 2.3.0 — 2023-03-08
- 2.1.0 — 2022-11-02
- 2.0.7 — 2022-04-22
- 2.0.6 — 2022-03-24
- 2.0.4 — 2022-03-24
- 1.1.2 — 2021-02-02
- 1.1.1 — 2018-05-21
- 1.1.0 — 2018-01-29
- 1.0.0 — 2017-09-24
- 0.1.2 — 2017-07-18
- 0.1.1 — 2017-07-18
- 0.1.0 — 2017-07-18

## README

## envkey-webpack-plugin

A webpack plugin that wraps [EnvKey's](https://www.envkey.com) [Node.js library](https://www.github.com/envkey/envkey-node) so you can easily inject allow-listed configuration into your browser apps.

All vars will be available on `process.env` in the browser.

To make `process.env.NODE_ENV` available, just add it to the `permitted` allow-list (see below).

## Install

`npm i envkey-webpack-plugin --save-dev`

## Usage

```javascript
var webpack = require("webpack"),
  EnvkeyWebpackPlugin = require("envkey-webpack-plugin");

module.exports = {
  //...

  plugins: [
    new EnvkeyWebpackPlugin({
      permitted: ["STRIPE_PUBLISHABLE_KEY", "PUSHER_APP_KEY", "NODE_ENV"], // required, specify allow-list of vars to pull from Envkey -- you can also include "NODE_ENV" to make that available

      dotEnvFile: ".env", // optional, specify alternate dotenv file path like ".env.staging" -- file should include valid ENVKEY variable

      define: { ANOTHER_VAR: "anotherVal" }, // optional, set additional vars on `process.env`
    }),
  ],

  //...
};
```

---
_Source: https://npm.io/package/envkey-webpack-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
