islandflow/apps/web/next.config.mjs
dirtydishes 53eeb9e72f Gate live feed staleness and isolate Next dev artifacts
- delay stale status for paused live feeds before surfacing disconnects
- keep `next dev` output separate from production build artifacts
- add coverage for the new live-feed stale threshold
2026-05-06 22:14:11 -04:00

16 lines
452 B
JavaScript

import { PHASE_DEVELOPMENT_SERVER } from "next/constants.js";
/**
* Keep dev and production build artifacts separate to avoid chunk/runtime
* mismatches when `next dev` and `next build` are run in overlapping sessions.
*
* @param {string} phase
* @returns {import("next").NextConfig}
*/
export default function nextConfig(phase) {
const isDev = phase === PHASE_DEVELOPMENT_SERVER;
return {
distDir: isDev ? ".next-dev" : ".next"
};
}