From 08965008c6258413ac64f08f99de06d597db7784 Mon Sep 17 00:00:00 2001 From: Tim Phillips <3578574+tim-phillips@users.noreply.github.com> Date: Fri, 4 May 2018 22:14:59 -0700 Subject: [PATCH] Prevent now-env from running in production (#4259) --- examples/with-now-env/next.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/with-now-env/next.config.js b/examples/with-now-env/next.config.js index e973ba8f..531eb9c4 100644 --- a/examples/with-now-env/next.config.js +++ b/examples/with-now-env/next.config.js @@ -2,7 +2,9 @@ const webpack = require('webpack') /** * After the next require you can use process.env to get your secrets */ -require('now-env') +if (process.env.NODE_ENV !== 'production') { + require('now-env') +} console.log({ SECRET: process.env.SECRET,