-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
32 lines (30 loc) · 1.2 KB
/
Copy pathnext.config.mjs
File metadata and controls
32 lines (30 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Fail fast when the session-signing secret is absent — otherwise the app boots fine and only
// breaks at the first login, which reads as "auth is broken" instead of "config is missing".
// (scripts/create-user.ts generates AUTH_SECRET into .env; Next loads .env before this file.)
const authSecret = process.env.AUTH_SECRET ?? '';
if (authSecret.length < 32) {
const msg =
'AUTH_SECRET이 없거나 너무 짧습니다(<32자). `npx tsx scripts/create-user.ts <id> <pw>` 로 생성하세요 (.env).';
if (process.env.NODE_ENV === 'production') throw new Error(msg);
console.warn(`[minesweeper] ${msg}`);
}
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
// Native / server-only packages must not be bundled into the client or RSC graph.
experimental: {
serverComponentsExternalPackages: [
'@libsql/client',
'libsql',
'pdfjs-dist',
'exceljs',
'adm-zip',
'pdf-to-img',
'@napi-rs/canvas',
],
},
// Type safety is enforced via `npm run typecheck`; ESLint is run separately so a missing
// lint config never blocks `next build` in a fresh clone.
eslint: { ignoreDuringBuilds: true },
};
export default nextConfig;