Socket
Socket
Sign inDemoInstall

dotenv-webpack

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dotenv-webpack - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

15

dist/index.js

@@ -32,10 +32,21 @@ 'use strict';

safe: false,
sample: './.env.example',
systemvars: false
}, options);
if (options.sample) {
console.warn('dotend-webpack: "options.sample" is a deprecated property. Please update your configuration to use simple "options.safe".');
}
var vars = options.systemvars ? _extends({}, process.env) : {};
var env = this.loadFile(options.path);
var blueprint = options.safe ? this.loadFile(options.sample) : env;
var blueprint = env;
if (options.safe) {
var file = './.env.example';
if (options.safe !== true) {
file = options.safe;
}
blueprint = this.loadFile(file);
}
Object.keys(blueprint).map(function (key) {

@@ -42,0 +53,0 @@ var value = env[key] || env[key];

2

package.json
{
"name": "dotenv-webpack",
"description": "A simple webpack plugin to support dotenv.",
"version": "1.2.1",
"version": "1.3.0",
"main": "index.js",

@@ -6,0 +6,0 @@ "scripts": {

@@ -49,4 +49,3 @@ # dotenv-webpack

* **path** (`'./env'`) - The path to your environment variables.
* **safe** (`false`) - If false, just load the variables, if true, load the file in the *sample* property.
* **sample** (`'./.env.example'`) - The sample file to use for validation.
* **safe** (`false`) - If false ignore safe-mode, if true load `'./.env.example'`, if a string load that file as the sample.
* **systemvars** (`false`) - Set to true if you would rather load all system variables as well (useful for CI purposes).

@@ -53,0 +52,0 @@

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