mega-plant/next.config.ts
Mega Plant b70fc8c5c7 Round 2 (Parts B-D): asset register restructure, type field, sequential codes, flat sortable table, cost_lines, removed synthetic code, fail loudly
- B.1: removed running_cost from PB monthly_income schema
- B.2: 40 of 40 machines now have income (was 32/40)
- B.3: removed syntheticCode() + auto-create branch; deleted 2 ghost Z* assets; seed fails loudly on unmatched
- C.1: collapsed 13 cost-component rows into 5 machines + new cost_lines collection; Finance/Insurance/Tracking categories removed from assets
- C.2: type field on assets derived from code prefix
- C.3: sequential codes SC01-07, OC01-02, PC01-02; fixed SITE CONTANER spelling
- C.4: flat sortable plant register table with type filter pills
- C.5: wired filter input on plant register
- D: verified term 2 (insurance) reconciles for all 5 financed machines
2026-09-12 10:24:26 +02:00

22 lines
845 B
TypeScript

import type { NextConfig } from "next";
import withPWAInit from "@ducanh2912/next-pwa";
const nextConfig: NextConfig = {
// No `env` block — NEXT_PUBLIC_ vars are picked up automatically at build time.
};
const withPWA = withPWAInit({
dest: "public",
// Off in dev. next-pwa writes sw.js + workbox-*.js into `dest` on every
// compile, and the dev server watches public/ — so leaving it on makes each
// build trigger the next one, forever. A dev service worker also serves
// stale assets against HMR. Production builds are unaffected.
disable: process.env.NODE_ENV === "development",
cacheOnFrontEndNav: true,
aggressiveFrontEndNavCaching: true,
reloadOnOnline: true,
register: true,
workboxOptions: { cleanupOutdatedCaches: true, clientsClaim: true, skipWaiting: true },
});
export default withPWA(nextConfig);