-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnext.config.ts
More file actions
48 lines (42 loc) · 1.33 KB
/
Copy pathnext.config.ts
File metadata and controls
48 lines (42 loc) · 1.33 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// Enable standalone output for Docker
output: 'standalone',
// Ship the Drizzle migrations folder with the serverless function bundle.
// Without this, /api/admin/migrate can't read drizzle/migrations/*.sql at
// runtime — Next.js's file tracer only follows explicit `import`s and
// these are read via `fs.readFileSync`.
outputFileTracingIncludes: {
'/api/admin/migrate': ['./drizzle/migrations/**/*'],
},
// Configure images for external domains
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '*.blob.core.windows.net',
},
{
protocol: 'https',
hostname: '*.amazonaws.com',
}
]
},
// Allow hot reloading in Docker development
...(process.env.NODE_ENV === 'development' && {
experimental: {
serverActions: {
allowedOrigins: ['localhost:3000', '127.0.0.1:3000']
}
}
}),
// Map wavelog's legacy /index.php/api/* URL form onto the canonical /api/*
// routes. Some older ham radio software hardcodes the index.php prefix
// because wavelog/cloudlog ships without URL rewriting by default.
async rewrites() {
return [
{ source: '/index.php/api/:path*', destination: '/api/:path*' },
];
},
};
export default nextConfig;