rsnext/test/integration/production-config/next.config.js
Jiachi Liu d5e767b20d
Add process env NEXT_RUNTIME (#36383)
* To help determine the current running environment is in server nodejs / edge runtime
* Remove usage of `process.browser`
2022-04-26 17:54:28 +00:00

31 lines
650 B
JavaScript

module.exports = {
env: {
...(process.env.ENABLE_ENV_FAIL_UNDERSCORE
? {
__NEXT_MY_VAR: 'test',
}
: {}),
...(process.env.ENABLE_ENV_FAIL_NODE
? {
NODE_ENV: 'abc',
}
: {}),
...(process.env.ENABLE_ENV_WITH_UNDERSCORES
? {
SOME__ENV__VAR: '123',
}
: {}),
...(process.env.ENABLE_ENV_NEXT_PRESERVED
? {
NEXT_RUNTIME: 'nodejs',
}
: {}),
},
onDemandEntries: {
// Make sure entries are not getting disposed.
maxInactiveAge: 1000 * 60 * 60,
},
async generateBuildId() {
return 'custom-buildid'
},
}