Add note about getConfig

This commit is contained in:
Tim Neutkens 2018-03-29 10:17:44 +02:00
parent 9f4e707682
commit cfe748d4b5

View file

@ -1185,7 +1185,7 @@ module.exports = {
```js
// pages/index.js
import getConfig from 'next/config'
const {serverRuntimeConfig, publicRuntimeConfig} = getConfig()
const {serverRuntimeConfig, publicRuntimeConfig} = getConfig() // Only holds serverRuntimeConfig and publicRuntimeConfig from next.config.js nothing else.
console.log(serverRuntimeConfig.mySecret) // Will only be available on the server side
console.log(publicRuntimeConfig.staticFolder) // Will be available on both server and client