fed9c97ddb
- app/[[...slug]]/page.tsx replaces app/page.tsx; activeSlug from URL params - SidebarNav and MobileNav removed from main layout (sections accordion is the nav) - next.config.ts: output:export controlled by STATIC_EXPORT env var instead of NODE_ENV - package.json: yarn build is standard Next.js build; yarn export is STATIC_EXPORT=true - Mock API route: force-static + generateStaticParams for output:export compatibility
14 lines
409 B
TypeScript
14 lines
409 B
TypeScript
import type { NextConfig } from 'next';
|
|
|
|
/* output: 'export' is opt-in via STATIC_EXPORT=true.
|
|
* Set this in CI/deploy — not locally — so the mock API route works
|
|
* during development and local builds. */
|
|
const isExport = process.env.STATIC_EXPORT === 'true';
|
|
|
|
const nextConfig: NextConfig = {
|
|
...(isExport ? { output: 'export' } : {}),
|
|
images: { unoptimized: true },
|
|
};
|
|
|
|
export default nextConfig;
|