Unverified Commit ed064348 authored by Nicolas Rouanne's avatar Nicolas Rouanne Committed by GitHub

fix: typo in `isStaging` in `with-env` example (#11305)

* fix: typo in `isStaging` in `with-env` example

- add missing `phase ===` statement when checking for _staging_ env in `isStaging`

* Update examples/with-env-from-next-config-js/next.config.js

* style: fix prettier issue in example `with-env-from-next-config-js`
Co-authored-by: 's avatarLuis Alvarez D <luis@zeit.co>
parent db57ad3b
...@@ -10,7 +10,8 @@ module.exports = phase => { ...@@ -10,7 +10,8 @@ module.exports = phase => {
// when `next build` or `npm run build` is used // when `next build` or `npm run build` is used
const isProd = phase === PHASE_PRODUCTION_BUILD && process.env.STAGING !== '1' const isProd = phase === PHASE_PRODUCTION_BUILD && process.env.STAGING !== '1'
// when `next build` or `npm run build` is used // when `next build` or `npm run build` is used
const isStaging = PHASE_PRODUCTION_BUILD && process.env.STAGING === '1' const isStaging =
phase === PHASE_PRODUCTION_BUILD && process.env.STAGING === '1'
console.log(`isDev:${isDev} isProd:${isProd} isStaging:${isStaging}`) console.log(`isDev:${isDev} isProd:${isProd} isStaging:${isStaging}`)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment