envkey-webpack-plugin
Advanced tools
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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
3547
16