Commit 341c34d4 authored by Tim Neutkens's avatar Tim Neutkens

Move getConfig message to the line above in readme

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