From cf130c70f0b6a002d437fc175ad513ed30a6244a Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Wed, 26 Jul 2017 20:39:21 +0200 Subject: [PATCH] Prefix process.env to avoid inconsistency (#2647) --- examples/with-universal-configuration/env-config.js | 2 +- examples/with-universal-configuration/pages/index.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/with-universal-configuration/env-config.js b/examples/with-universal-configuration/env-config.js index 47555f89..a43d4ef6 100644 --- a/examples/with-universal-configuration/env-config.js +++ b/examples/with-universal-configuration/env-config.js @@ -1,5 +1,5 @@ const prod = process.env.NODE_ENV === 'production' module.exports = { - 'BACKEND_URL': prod ? 'https://api.example.com' : 'https://localhost:8080' + 'process.env.BACKEND_URL': prod ? 'https://api.example.com' : 'https://localhost:8080' } diff --git a/examples/with-universal-configuration/pages/index.js b/examples/with-universal-configuration/pages/index.js index afb3c4ee..c473d1b6 100644 --- a/examples/with-universal-configuration/pages/index.js +++ b/examples/with-universal-configuration/pages/index.js @@ -1,5 +1,3 @@ -/* global BACKEND_URL */ - export default () => ( -
Loading data from { BACKEND_URL }
+
Loading data from { process.env.BACKEND_URL }
)