rsnext/docs/api-reference/next.config.js/configuring-onDemandEntries.md
Luis Alvarez D 7fc850e28a [docs] Added related links to next.config.js (#10174)
* Added related links

* Added missing dots
2020-01-20 21:40:20 +01:00

29 lines
851 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,
},
}
```
## Related
<div class="card">
<a href="/docs/api-reference/next.config.js/introduction.md">
<b>Introduction to next.config.js:</b>
<small>Learn more about the configuration file used by Next.js.</small>
</a>
</div>