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

13 lines
262 B
JavaScript
Raw Normal View History

if (process.browser) {
global.__THIS_SHOULD_ONLY_BE_DEFINED_IN_BROWSER_CONTEXT__ = true
}
if (!process.browser) {
global.__THIS_SHOULD_ONLY_BE_DEFINED_IN_SERVER_CONTEXT__ = true
}
export default () => (
<div id='node-env'>{process.env.NODE_ENV}</div>
)