Skip to content

Commit c7bdcea

Browse files
mayank23timneutkens
authored andcommitted
Update README.md (#6749)
- fix runtime configuration example to use `customKey` - standardize warning callouts to use a block quote and bold "**Warning:**" text. Previously there were different ways a warning was mentioned on the docs page: - A warning emoji. The warning emoji didn't render in the actual site. <img width="770" alt="Screen Shot 2019-03-21 at 9 22 21 AM" src="https://user-images.githubusercontent.com/1103708/54759302-c655f380-4bbb-11e9-9116-b0fdc2467bc3.png"> - Italicized "Warning" text. Imo, does not stand out on the page. <img width="663" alt="Screen Shot 2019-03-21 at 9 24 43 AM" src="https://user-images.githubusercontent.com/1103708/54759376-f604fb80-4bbb-11e9-85c6-6589b7738dee.png">
1 parent 42d6560 commit c7bdcea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/next/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,7 @@ Some commonly asked for features are available as modules:
15181518
- [@zeit/next-preact](https://github.com/zeit/next-plugins/tree/master/packages/next-preact)
15191519
- [@zeit/next-typescript](https://github.com/zeit/next-plugins/tree/master/packages/next-typescript)
15201520
1521-
*Warning: The `webpack` function is executed twice, once for the server and once for the client. This allows you to distinguish between client and server configuration using the `isServer` property*
1521+
> **Warning:** The `webpack` function is executed twice, once for the server and once for the client. This allows you to distinguish between client and server configuration using the `isServer` property
15221522
15231523
Multiple configurations can be combined together with function composition. For example:
15241524
@@ -1668,17 +1668,17 @@ This will allow you to use `process.env.customKey` in your code. For example:
16681668
```jsx
16691669
// pages/index.js
16701670
function Index() {
1671-
return <h1>The value of customEnv is: {process.env.customEnv}</h1>
1671+
return <h1>The value of customEnv is: {process.env.customKey}</h1>
16721672
}
16731673

16741674
export default Index
16751675
```
16761676
16771677
#### Runtime configuration
16781678
1679-
> :warning: Note that this option is not available when using `target: 'serverless'`
1679+
> **Warning:** Note that this option is not available when using `target: 'serverless'`
16801680
1681-
> :warning: Generally you want to use build-time configuration to provide your configuration.
1681+
> **Warning:** Generally you want to use build-time configuration to provide your configuration.
16821682
The reason for this is that runtime configuration adds a small rendering / initialization overhead.
16831683
16841684
The `next/config` module gives your app access to the `publicRuntimeConfig` and `serverRuntimeConfig` stored in your `next.config.js`.

0 commit comments

Comments
 (0)