---
title: next.config.js Options
description: Learn about the options available in next.config.js for the Pages Router.
url: "https://nextjs.org/docs/14/pages/api-reference/next-config-js"
docs_index: /docs/14/pages/llms.txt
version: 14.2.35
lastUpdated: 2023-06-28
prerequisites:
  - "API Reference: /docs/14/pages/api-reference"
---


> For an index of all Next.js documentation, see [/docs/14/pages/llms.txt](/docs/14/pages/llms.txt).

- [assetPrefix](/docs/14/pages/api-reference/next-config-js/assetPrefix)
  - Learn how to use the assetPrefix config option to configure your CDN.
- [basePath](/docs/14/pages/api-reference/next-config-js/basePath)
  - Use `basePath` to deploy a Next.js application under a sub-path of a domain.
- [compress](/docs/14/pages/api-reference/next-config-js/compress)
  - Next.js provides gzip compression to compress rendered content and static files, it only works with the server target. Learn more about it here.
- [devIndicators](/docs/14/pages/api-reference/next-config-js/devIndicators)
  - Optimized pages include an indicator to let you know if it's being statically optimized. You can opt-out of it here.
- [distDir](/docs/14/pages/api-reference/next-config-js/distDir)
  - Set a custom build directory to use instead of the default .next directory.
- [env](/docs/14/pages/api-reference/next-config-js/env)
  - Learn to add and access environment variables in your Next.js application at build time.
- [eslint](/docs/14/pages/api-reference/next-config-js/eslint)
  - Next.js reports ESLint errors and warnings during builds by default. Learn how to opt-out of this behavior here.
- [exportPathMap](/docs/14/pages/api-reference/next-config-js/exportPathMap)
  - Customize the pages that will be exported as HTML files when using `next export`.
- [generateBuildId](/docs/14/pages/api-reference/next-config-js/generateBuildId)
  - Configure the build id, which is used to identify the current build in which your application is being served.
- [generateEtags](/docs/14/pages/api-reference/next-config-js/generateEtags)
  - Next.js will generate etags for every page by default. Learn more about how to disable etag generation here.
- [headers](/docs/14/pages/api-reference/next-config-js/headers)
  - Add custom HTTP headers to your Next.js app.
- [httpAgentOptions](/docs/14/pages/api-reference/next-config-js/httpAgentOptions)
  - Next.js will automatically use HTTP Keep-Alive by default. Learn more about how to disable HTTP Keep-Alive here.
- [images](/docs/14/pages/api-reference/next-config-js/images)
  - Custom configuration for the next/image loader
- [onDemandEntries](/docs/14/pages/api-reference/next-config-js/onDemandEntries)
  - Configure how Next.js will dispose and keep in memory pages created in development.
- [output](/docs/14/pages/api-reference/next-config-js/output)
  - Next.js automatically traces which files are needed by each page to allow for easy deployment of your application. Learn how it works here.
- [pageExtensions](/docs/14/pages/api-reference/next-config-js/pageExtensions)
  - Extend the default page extensions used by Next.js when resolving pages in the Pages Router.
- [poweredByHeader](/docs/14/pages/api-reference/next-config-js/poweredByHeader)
  - Next.js will add the `x-powered-by` header by default. Learn to opt-out of it here.
- [productionBrowserSourceMaps](/docs/14/pages/api-reference/next-config-js/productionBrowserSourceMaps)
  - Enables browser source map generation during the production build.
- [reactStrictMode](/docs/14/pages/api-reference/next-config-js/reactStrictMode)
  - The complete Next.js runtime is now Strict Mode-compliant, learn how to opt-in
- [redirects](/docs/14/pages/api-reference/next-config-js/redirects)
  - Add redirects to your Next.js app.
- [rewrites](/docs/14/pages/api-reference/next-config-js/rewrites)
  - Add rewrites to your Next.js app.
- [Runtime Config](/docs/14/pages/api-reference/next-config-js/runtime-configuration)
  - Add client and server runtime configuration to your Next.js app.
- [trailingSlash](/docs/14/pages/api-reference/next-config-js/trailingSlash)
  - Configure Next.js pages to resolve with or without a trailing slash.
- [transpilePackages](/docs/14/pages/api-reference/next-config-js/transpilePackages)
  - Automatically transpile and bundle dependencies from local packages (like monorepos) or from external dependencies (`node_modules`).
- [turbo](/docs/14/pages/api-reference/next-config-js/turbo)
  - Configure Next.js with Turbopack-specific options
- [typescript](/docs/14/pages/api-reference/next-config-js/typescript)
  - Next.js reports TypeScript errors by default. Learn to opt-out of this behavior here.
- [urlImports](/docs/14/pages/api-reference/next-config-js/urlImports)
  - Configure Next.js to allow importing modules from external URLs (experimental).
- [webpack](/docs/14/pages/api-reference/next-config-js/webpack)
  - Learn how to customize the webpack config used by Next.js
- [webVitalsAttribution](/docs/14/pages/api-reference/next-config-js/webVitalsAttribution)
  - Learn how to use the webVitalsAttribution option to pinpoint the source of Web Vitals issues.

---

For an index of all available documentation, see [/docs/14/pages/llms.txt](/docs/14/pages/llms.txt)