title: Next.js config description: next.config.js detailed configuration: i18n, build, images, webpack.
Next.js Config
next.config.js is the build configuration entry for Realm. This page documents its actual settings.
i18n plugin
i18n/request.ts is the next-intl 4 request config entry, loading locales/<locale>.json by locale.
Build config
NEXT_BUILD_DIR lets deployment wrappers set a custom output directory. Do not set it during normal development.
Allowed dev origins
The dev server needs to be accessible via dev.arsvine.com (custom hosts) so that COS bucket Referer checks don't block image loading.
Remote image allowlist
remotePatterns is centralized in config/image-hosts.js, not hard-coded in next.config.js. See seo-and-security.
Bundle Analyzer
Only enabled when ANALYZE=true. Output goes to .next/analyze/.
Webpack
Disables cache on Windows production builds:
Avoids webpack 5 cache serialization issues on Windows.
File location
arsvine-realm/next.config.js — approximately 40 lines, containing all of the above.