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 - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

13

index.js

@@ -7,5 +7,6 @@ var webpack = require('webpack'),

function EnvkeyWebpackPlugin(opts) {
var env = envkey.load(opts),
defineParams = {}
envkey.load(opts)
var defineParams = {}
if (!opts.permitted || !opts.permitted.length){

@@ -15,2 +16,4 @@ throw new Error("'permitted' key required to specifiy vars whitelisted for client.")

for (k of opts.permitted) defineParams[k] = JSON.stringify(process.env[k])
if (opts.define){

@@ -22,9 +25,3 @@ for (k in opts.define){

if (opts.permitted.indexOf("NODE_ENV") > -1){
defineParams.NODE_ENV = JSON.stringify(process.env.NODE_ENV)
}
for (k in env) defineParams[k] = JSON.stringify(env[k])
return new webpack.DefinePlugin({"process.env": defineParams})
}
{
"name": "envkey-webpack-plugin",
"version": "1.1.0",
"version": "1.1.1",
"description": "Use envkey as a webpack plugin.",

@@ -5,0 +5,0 @@ "main": "index.js",

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