Configure options below — the preview updates in real time.

Core

Fundamental settings for React mode, output strategy, routing, and base paths.

React Strict ModeEnable React Strict Mode to highlight potential lifecycle and state issues during development. Enabled by default with the App Router since Next.js 13.5.1.

Alters the build output. 'standalone' creates a minimal server trace (ideal for Docker). 'export' enforces static HTML output.

Deploy a Next.js app under a sub-path of a domain (e.g. /docs). Must start with '/'.

CDN prefix for static assets (e.g. https://cdn.example.com).

Trailing SlashEnforce URLs with a trailing slash (/about/) when true, or without (/about) when false.

Custom build output directory instead of the default .next folder.

Cache ComponentsEnable cache components to opt into Partial Prerendering (PPR). Replaces the removed experimental.ppr flag in Next.js 16.

Server & Optimization

Server-side behavior, compression, headers, caching, and font optimization.

CompressEnable Gzip compression for rendered content and static files.
Powered By HeaderInclude the X-Powered-By: Next.js response header.
Generate ETagsControl generation of ETag headers for caching HTML pages.
Optimize FontsAutomatically optimize and inline Google/Typekit web fonts.
Production Browser Source MapsGenerate browser source maps in production builds.

Timeout in seconds for getStaticProps before a single page generation is aborted.

Maximum memory (in bytes) for the in-memory cache. Set to 0 to disable.

Path to a custom cache handler file for persisting cached data (e.g. Redis).

Build & Compilation

Build behavior, TypeScript, and clean-up settings.

Clean Dist DirectoryAutomatically clean the .next output directory before each build.
Exclude Default Moment LocalesExclude all default Moment.js locales from the bundle to reduce size.
Output File TracingTrace and output the exact server files needed to run the application.

Base root directory for output file tracing (useful in monorepos).

Bundle Pages Router DependenciesEnable automatic server-side dependency bundling for Pages Router (matching App Router behavior).
TypeScript — Ignore Build ErrorsAllow production builds to succeed even with TypeScript compilation errors.

Path to a custom TypeScript configuration file.

React CompilerEnable the React Compiler for automatic memoization of components, reducing unnecessary re-renders. Stable in Next.js 16.
Typed RoutesEnable statically typed links and route parameters. Requires TypeScript. Stable in Next.js 16.

Routing

URL normalization, trailing slash behavior, file-system routing, and page extensions.

Skip Trailing Slash RedirectBypass the default automatic redirect between trailing and non-trailing slash URLs.
Skip Proxy URL NormalizeSkip URL normalization applied to requests handled by the proxy (formerly middleware). Renamed from skipMiddlewareUrlNormalize in Next.js 16.
Use File System Public RoutesEnable file-system based routing from the /pages directory. Disable for fully custom server routing.

File extensions the router recognizes as page files.

Additional origins that are allowed to request the development server.

Image Optimization

Configure the built-in Next.js Image Optimization API.

UnoptimizedServe images as-is without optimization. Useful for static exports.

Allow-listed external URL patterns for image optimization (e.g. https://example.com/account123/**).

Allowed optimized image output formats.

Dangerously Allow SVGPermit SVG images through the optimization API.

Minimum cache time-to-live in seconds for optimized images. Changed to 14400 (4 hours) in Next.js 16.

Image loader to use instead of the built-in optimizer. Use 'custom' with a loaderFile for custom providers.

Path to a custom image loader file (relative to project root). Required when loader is set to 'custom'.

Environment Variables

Expose build-time environment variables to the JavaScript bundle.

Key-value pairs exposed at build time (available in both server and client code).

Cross-Origin & HTTP

CORS attributes for scripts and HTTP agent configuration.

CORS crossorigin attribute added to all generated <script> and <link> tags.

HTTP Keep-AliveEnable persistent HTTP connections for server-side fetches.

Logging

Configure terminal logging for development and debugging.

Log Full Fetch URLsShow full URLs for internal fetch requests in terminal output.

Packages & Transpilation

Control dependency bundling, transpilation, and server external packages.

NPM packages to transpile through the SWC compiler pipeline.

Node.js packages to exclude from the Server Components bundler (use native require).

Internationalization (i18n)

Pages Router internationalized routing settings.

The default locale for the application (e.g. en).

List of all supported locales.

Development

Development server indicators and on-demand entry caching behavior.

Show the on-screen route indicator during next dev. Set to false to hide. In Next.js 16, buildActivity and buildActivityPosition were removed; use position instead.

Position of the development indicator on screen.

How long (in ms) a compiled page stays in memory without being accessed.

Number of pages to keep in memory simultaneously during development.

Compiler (SWC)

Advanced SWC compiler options for styled-components, emotion, and console removal.

Styled ComponentsEnable SWC transforms for styled-components (SSR support, minification, etc.).
EmotionEnable SWC transforms for Emotion CSS-in-JS.
Remove ConsoleRemove console.* statements from production builds.
React Remove PropertiesRemove React properties like data-testid from production builds.

Experimental

Experimental and upcoming Next.js features. Use with caution as they may change.

Packages to auto-optimize by replacing full imports with scoped internal paths.

Stale time in seconds for dynamic pages in client-side router cache.

Stale time in seconds for static pages in client-side router cache.

Sass Options

Configure the bundled Sass compiler with include paths and prepended data.

Additional directories for the Sass compiler to resolve @import and @use.

Sass code prepended to every Sass file before compilation.