@jackhuynh1995/vue-cli-plugin-envhot
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -29,14 +29,17 @@ (function (factory) { | ||
api.configureDevServer(function (app, server) { | ||
var watcher = (0, chokidar_1.watch)(".env?(.development)?(.local)"); | ||
// changed envFile | ||
watcher.on("change", function () { | ||
// Check if not in production mode | ||
if (process.env.NODE_ENV !== 'production') { | ||
var watcher = (0, chokidar_1.watch)(".env?(.development)?(.local)"); | ||
// changed envFile | ||
watcher.on("change", function () { | ||
(0, parseEnv_1.default)(envFiles); | ||
server.invalidate(function () { }); | ||
// server. | ||
}); | ||
// immediately | ||
(0, parseEnv_1.default)(envFiles); | ||
server.invalidate(function () { }); | ||
// server. | ||
}); | ||
// immediately | ||
(0, parseEnv_1.default)(envFiles); | ||
server.invalidate(function () { }); | ||
} | ||
}); | ||
}; | ||
}); |
{ | ||
"name": "@jackhuynh1995/vue-cli-plugin-envhot", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "hot reloading your .env files, never worry about restarting yor wde", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -21,15 +21,18 @@ import { watch } from "chokidar"; | ||
api.configureDevServer((app, server) => { | ||
const watcher = watch(".env?(.development)?(.local)"); | ||
// Check if not in production mode | ||
if (process.env.NODE_ENV !== 'production') { | ||
const watcher = watch(".env?(.development)?(.local)"); | ||
// changed envFile | ||
watcher.on("change", () => { | ||
// changed envFile | ||
watcher.on("change", () => { | ||
parseEnv(envFiles); | ||
server.invalidate(() => {}); | ||
// server. | ||
}); | ||
// immediately | ||
parseEnv(envFiles); | ||
server.invalidate(() => {}); | ||
// server. | ||
}); | ||
// immediately | ||
parseEnv(envFiles); | ||
server.invalidate(() => {}); | ||
} | ||
}); | ||
}; |
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
18297
465
5