Files
dnsmasq-admin/next.config.ts
T
jamo.siu@gmail.com 1e4f028685 refactor(db): switch records layer to Prisma
- Replace hand-written node:sqlite queries with a Prisma client using
  the better-sqlite3 driver adapter
- Version the schema with migrations: baseline table, timestamp
  normalisation, and WAL journal mode
- Store timestamps with an explicit UTC offset so they stop being parsed
  as local time
- Show created/updated times on the edit page, formatted with dayjs
- Move the root redirect into next.config to avoid a prerender error
- Run migrations from the container entrypoint before starting the server

BREAKING CHANGE: DNSMASQ_ADMIN_DB_PATH is replaced by DATABASE_URL, which
must be a Prisma connection URL (file:./data/dnsmasq-admin.db). Existing
database files are migrated in place and need no conversion.
2026-10-12 14:27:03 +08:00

28 lines
814 B
TypeScript

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
// The root route only ever forwards to /records, so it is handled at the routing layer
// instead of by a page component that calls redirect() during render. Rendering first used
// to make Next try to validate the redirect target during prerender and report a stray
// NEXT_REDIRECT error, even though the 307 itself was served correctly.
async redirects() {
return [{ source: "/", destination: "/records", permanent: false }]
},
experimental: {
agentFeedback: true,
},
cacheComponents: true,
partialPrefetching: true,
turbopack: {
rules: {
"*.css": {
loaders: ["@tailwindcss/turbopack"],
as: "*.css",
},
},
},
};
export default nextConfig;