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

envkey-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

envkey-webpack-plugin

Use envkey as a webpack plugin.

  • 2.5.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
494
decreased by-10.34%
Maintainers
1
Weekly downloads
 
Created
Source

envkey-webpack-plugin

A webpack plugin that wraps EnvKey's Node.js library 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

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`
    }),
  ],

  //...
};

Keywords

FAQs

Package last updated on 01 Sep 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