import type { NextConfig } from "next"; const nextConfig: NextConfig = { output: "standalone", experimental: { // Turbopack's build cache lives in .next/cache and only pays off when that // directory survives between builds. A Docker/Dokploy build starts from a // clean layer every time, so the cache is written and never read — ~117 MB // of pure write cost per build. CI_BUILD is set in the Dockerfile only, so // local `npm run build` keeps its warm cache. turbopackFileSystemCacheForBuild: process.env.CI_BUILD !== "1", }, // The platform console renamed Companies → Merchants and Stores → Shops. // Temporary (307) so bookmarks keep working without browsers caching the // move forever while the admin IA is still settling. async redirects() { return [ { source: "/admin/companies/:id/stores/:shopId/:rest*", destination: "/admin/merchants/:id/shops/:shopId/:rest*", permanent: false, }, { source: "/admin/companies/:rest*", destination: "/admin/merchants/:rest*", permanent: false, }, {source: "/admin/stores", destination: "/admin/merchants", permanent: false}, // The overview IS /admin; these are the names people guess for it. {source: "/admin/overview", destination: "/admin", permanent: false}, {source: "/admin/dashboard", destination: "/admin", permanent: false}, ]; }, allowedDevOrigins: ["192.168.0.117", "192.168.0.*", "192.168.1.*", "localhost", "127.0.0.1"], images: { remotePatterns: [ { protocol: "https", hostname: "images.unsplash.com", }, ], }, }; export default nextConfig;