learning_ai_clock/web/next.config.ts
saravanakumardb1 582936ad65 feat(repo): migrate chronomind workspace to pnpm
- Add pnpm-workspace.yaml (backend + web + common-plat packages)
- Add root package.json with workspace scripts and pnpm config
- Add packageManager: pnpm@10.6.5 to backend/web manifests
- Remove package-lock.json files, generate pnpm-lock.yaml
- Add root .gitignore (was missing)
- Update CI to use pnpm workspace commands
- Add transpilePackages + webpack symlinks to next.config.ts
- Update docker-prep.sh for backend + web consumers
- Rewrite backend/web Dockerfiles to .docker-deps consumer pattern
- Add .dockerignore

Verified: typecheck + 576 tests (182 backend + 394 web) + builds pass
Docker: backend + web smoke builds pass
2026-03-22 19:11:01 -07:00

63 lines
1.3 KiB
TypeScript

import type { NextConfig } from "next";
import withSerwistInit from "@serwist/next";
const withSerwist = withSerwistInit({
swSrc: "src/app/sw.ts",
swDest: "public/sw.js",
});
const securityHeaders = [
{
key: "X-Frame-Options",
value: "DENY",
},
{
key: "X-Content-Type-Options",
value: "nosniff",
},
{
key: "X-XSS-Protection",
value: "1; mode=block",
},
{
key: "Referrer-Policy",
value: "strict-origin-when-cross-origin",
},
{
key: "Permissions-Policy",
value: "camera=(), microphone=(), geolocation=()",
},
{
key: "Strict-Transport-Security",
value: "max-age=31536000; includeSubDomains",
},
];
const nextConfig: NextConfig = {
...(process.env.VERCEL ? {} : { output: 'standalone' }),
transpilePackages: [
"@bytelyst/api-client",
"@bytelyst/auth-client",
"@bytelyst/diagnostics-client",
"@bytelyst/feature-flag-client",
"@bytelyst/react-auth",
"@bytelyst/subscription-client",
"@bytelyst/sync",
"@bytelyst/telemetry-client",
],
webpack: (config) => {
config.resolve.symlinks = true;
return config;
},
async headers() {
return [
{
source: "/(.*)",
headers: securityHeaders,
},
];
},
};
export default withSerwist(nextConfig);