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:
parent
37531726c2
commit
cf130c70f0
|
@ -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'
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue