Commit d51245b8 authored by Jacob Page's avatar Jacob Page Committed by Tim Neutkens

Improve documentation on runtime configuration (#4756)

* Remove nesting of runtime configuration under the babel section, since it's not related to babel.
* Clean up confusing verbiage relating to "keys."
parent ad2d4432
...@@ -1359,9 +1359,9 @@ These presets / plugins **should not** be added to your custom `.babelrc`. Inste ...@@ -1359,9 +1359,9 @@ These presets / plugins **should not** be added to your custom `.babelrc`. Inste
The `modules` option on `"preset-env"` should be kept to `false` otherwise webpack code splitting is disabled. The `modules` option on `"preset-env"` should be kept to `false` otherwise webpack code splitting is disabled.
#### Exposing configuration to the server / client side ### Exposing configuration to the server / client side
The `config` key allows for exposing runtime configuration in your app. All keys are server only by default. To expose a configuration to both the server and client side you can use the `public` key. The `next/config` module gives your app access to runtime configuration stored in your `next.config.js`. Place any server-only runtime config under a `serverRuntimeConfig` property and anything accessible to both client and server-side code under `publicRuntimeConfig`.
```js ```js
// next.config.js // next.config.js
......
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