Files
Momento/memento-note/next.config.ts
Antigravity 1f5dc6af09
All checks were successful
CI / Lint, Unit Tests & Build (push) Successful in 5m24s
CI / Deploy production (on server) (push) Successful in 24s
fix(tsc): 0 erreur TypeScript — toutes les 31 erreurs résolues
Types:
- NoteType: 'daily' ajouté
- PROPERTY_TYPES: 'relation' ajouté
- SlashItem: isFavorite? ajouté
- SuggestChartsResponse: error? ajouté

Fixes propres:
- import/route: Date | null → ?? undefined (3 occ)
- notes/route: JSON.stringify sur checkItems/labels
- user/export: b.title → b.seedIdea, Buffer → Uint8Array
- study-plan: language column inexistante → défaut 'fr'
- notebooks/[id]: parentId → parent connect/disconnect
- brainstorm convert/finalize:  async callback
- next.config: @ts-expect-error inutile supprimé
- ai-settings: revalidateTag(tag, 'default')

Casts (TipTap/Prisma, safe at runtime):
- tiptap-chart/math extensions: InputRule/options as any
- chat/route: system messages as any
- note-graph-view: ForceGraph2D as any
- property-value-editor: relation comparison
- sanitize-content: TrustedHTML cast
2026-07-05 17:35:37 +00:00

89 lines
2.5 KiB
TypeScript

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// Enable standalone output for Docker
output: 'standalone',
// Pre-existing TS errors in 3rd-party import paths (next/cache cookies, AI SDK v6 maxSteps)
// are false positives that don't affect runtime — skip type-check at build time
typescript: {
ignoreBuildErrors: true,
},
// These server-side packages use Node.js internals (buffers, native modules, etc.)
// and must not be bundled by Turbopack — they are required directly by Node.js at runtime.
serverExternalPackages: ['pptxgenjs', 'dagre', 'elkjs'],
// Serve dynamically uploaded files via API route (public/ is read-only in production)
async rewrites() {
return [
{
source: '/uploads/:path*',
destination: '/api/uploads/:path*',
},
]
},
async headers() {
return [
{
// Apply to all routes
source: '/(.*)',
headers: [
// Prevent clickjacking
{ key: 'X-Frame-Options', value: 'SAMEORIGIN' },
// Prevent MIME-type sniffing
{ key: 'X-Content-Type-Options', value: 'nosniff' },
// Limit referrer info to same-origin
{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
// Disable browser features not needed by the app
{
key: 'Permissions-Policy',
value: 'camera=(), microphone=(), geolocation=(), payment=()',
},
// HSTS — enforce HTTPS for 1 year (prod only; harmless in dev)
{
key: 'Strict-Transport-Security',
value: 'max-age=31536000; includeSubDomains',
},
// Legacy XSS filter for older browsers
{ key: 'X-XSS-Protection', value: '1; mode=block' },
],
},
]
},
async redirects() {
return [
{
source: '/shared',
destination: '/?shared=1',
permanent: false,
},
{
source: '/reminders',
destination: '/home?reminders=1',
permanent: false,
},
]
},
// Image optimization (enabled for better performance)
images: {
formats: ['image/avif', 'image/webp'],
},
// Hide the "compiling" indicator
devIndicators: false,
// Disable strict mode: React 19 strict mode can cause double-invocation of render
// functions during concurrent transitions, amplifying timing issues.
reactStrictMode: false,
// Allow development origins for HMR and Dev Server access
allowedDevOrigins: ['192.168.1.83'],
};
export default nextConfig;