You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*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
1522
1522
1523
1523
Multiple configurations can be combined together with function composition. For example:
1524
1524
@@ -1668,17 +1668,17 @@ This will allow you to use `process.env.customKey` in your code. For example:
1668
1668
```jsx
1669
1669
// pages/index.js
1670
1670
functionIndex() {
1671
-
return<h1>The value of customEnv is: {process.env.customEnv}</h1>
1671
+
return<h1>The value of customEnv is: {process.env.customKey}</h1>
1672
1672
}
1673
1673
1674
1674
exportdefaultIndex
1675
1675
```
1676
1676
1677
1677
#### Runtime configuration
1678
1678
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'`
1680
1680
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.
1682
1682
The reason for this is that runtime configuration adds a small rendering / initialization overhead.
1683
1683
1684
1684
The `next/config` module gives your app access to the `publicRuntimeConfig` and `serverRuntimeConfig` stored in your `next.config.js`.
0 commit comments