consolelog.tools

Next.js Config Builder

Build next.config.js interactively with common configurations

About this ToolHow it works, benefits & use cases

next.config.js options are easy to mistype and hard to remember — this builder lets you toggle them in a form and writes the file for you. Switch React Strict Mode and SWC minification on or off, choose an output mode (default, standalone for Docker, or static export), add a comma-separated list of allowed image domains (which also enables AVIF and WebP formats), turn on experimental App Directory and Server Actions, enable the styled-components compiler transform, and optionally ignore TypeScript build errors. Click Generate and you get a properly structured next.config.js with the @type JSDoc annotation and module.exports already wired up. A "Load Template" dropdown drops in ready-made presets — Basic, With Images, App Router, and Production Ready — as a starting point. The output can be copied, downloaded as next.config.js, or shared via URL, and the whole thing runs client-side.

How to Use

  1. 1Toggle Basic Settings (React Strict Mode, SWC Minification) on or off.
  2. 2Pick an Output Mode — Default, Standalone (Docker), or Static Export.
  3. 3Add comma-separated image domains, and enable App Directory, Server Actions, styled-components, or ignore-build-errors as needed.
  4. 4Or choose a preset from the "Load Template…" dropdown (Basic, With Images, App Router, Production Ready).
  5. 5Click "Generate Config", then copy, download as next.config.js, or share the result via its URL.

Key Benefits

  • Toggle React Strict Mode and SWC minification without remembering the keys
  • Output mode switch for standalone (Docker) and static export builds
  • Image domains input that also enables AVIF and WebP formats
  • Experimental App Directory and Server Actions checkboxes
  • styled-components compiler transform and ignore-TypeScript-errors options
  • One-click presets: Basic, With Images, App Router, and Production Ready
  • Outputs a typed, module.exports-ready next.config.js you can copy or download

Common Use Cases

  • Scaffolding a next.config.js for a fresh Next.js project in seconds
  • Adding standalone output before containerising a Next.js app with Docker
  • Enabling external image domains and modern formats for next/image
  • Turning on App Router and Server Actions experimental flags
  • Producing a production-ready config baseline to hand to a teammate via a link

Configuration Options

Basic Settings

Output Mode

Image Optimization

Comma-separated list of allowed image domains

Experimental Features

Compiler Options

Build Options

Run to see the generated next.config.js.

Configuration Tips

  • Enable SWC minification for faster builds
  • Use standalone output for Docker deployments
  • Configure image domains for external images
  • App Directory is the recommended approach for Next.js 13+

Was this tool helpful?

Share Your Experience

Help others discover this tool!

Related tools