1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Prefix process.env to avoid inconsistency (#2647)

This commit is contained in:
Tim Neutkens 2017-07-26 20:39:21 +02:00 committed by GitHub
parent 37531726c2
commit cf130c70f0
2 changed files with 2 additions and 4 deletions

View file

@ -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'
}

View file

@ -1,5 +1,3 @@
/* global BACKEND_URL */
export default () => (
<div>Loading data from { BACKEND_URL }</div>
<div>Loading data from { process.env.BACKEND_URL }</div>
)