d1fdd2bbf8
* Added descriptions * Added descriptions to API Reference * Added descriptions to API Routes * Added descriptions to basic features * Added descriptions to the routing docs * Update exportPathMap.md Co-authored-by: Joe Haddad <timer150@gmail.com>
20 lines
622 B
Markdown
20 lines
622 B
Markdown
---
|
|
description: Configure how Next.js will dispose and keep in memory pages created in development.
|
|
---
|
|
|
|
# Configuring onDemandEntries
|
|
|
|
Next.js exposes some options that give you some control over how the server will dispose or keep in memory built pages in development.
|
|
|
|
To change the defaults, open `next.config.js` and add the `onDemandEntries` config:
|
|
|
|
```js
|
|
module.exports = {
|
|
onDemandEntries: {
|
|
// period (in ms) where the server will keep pages in the buffer
|
|
maxInactiveAge: 25 * 1000,
|
|
// number of pages that should be kept simultaneously without being disposed
|
|
pagesBufferLength: 2,
|
|
},
|
|
}
|
|
```
|