mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Closes: https://linear.app/vercel/issue/DOC-4539/version-upgrade-guides Redirects: https://github.com/vercel/front/pull/44175 Move version upgrade guides under `Guides`. Also creates a guides section under the Pages docs.
24 lines
979 B
Plaintext
24 lines
979 B
Plaintext
---
|
|
title: bundlePagesRouterDependencies
|
|
description: Enable automatic dependency bundling for Pages Router
|
|
---
|
|
|
|
Enable automatic server-side dependency bundling for Pages Router applications. Matches the automatic dependency bundling in App Router.
|
|
|
|
```js filename="next.config.js"
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
bundlePagesRouterDependencies: true,
|
|
}
|
|
|
|
module.exports = nextConfig
|
|
```
|
|
|
|
Explicitly opt-out certain packages from being bundled using the [`serverExternalPackages`](/docs/pages/api-reference/config/next-config-js/serverExternalPackages) option.
|
|
|
|
## Version History
|
|
|
|
| Version | Changes |
|
|
| --------- | --------------------------------------------------------------------------------------------------------- |
|
|
| `v15.0.0` | Moved from experimental to stable. Renamed from `bundlePagesExternals` to `bundlePagesRouterDependencies` |
|