forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
84 lines (82 loc) · 2.01 KB
/
Copy pathnext.config.mjs
File metadata and controls
84 lines (82 loc) · 2.01 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
staticPageGenerationTimeout: 60 * 20,
// Bypass 2MB fetch cache limit by using file system cache directly
cacheHandler: fileURLToPath(import.meta.resolve('./cache-handler.cjs')),
// Pin the file-tracing root to this app dir. Next 15+ otherwise infers the
// workspace root from sibling lockfiles (monorepo) and nests the standalone
// output under that path, which breaks the Dockerfile's
// `COPY .../web/frontend/.next/standalone ./` + `CMD ["node","server.js"]`.
outputFileTracingRoot: dirname(fileURLToPath(import.meta.url)),
typescript: {
ignoreBuildErrors: true,
},
output: 'standalone',
experimental: {
serverActions: {
bodySizeLimit: '10mb',
},
},
async redirects() {
return [
{
source: '/memories/:path*',
destination: '/conversations/:path*',
permanent: true,
},
];
},
async rewrites() {
return [
{
source: '/conversations/:path*',
destination: '/memories/:path*',
},
];
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'raw.githubusercontent.com',
},
{
protocol: 'https',
hostname: 'storage.googleapis.com',
},
{
protocol: 'https',
hostname: 'pbs.twimg.com',
},
{
protocol: 'https',
hostname: 'abs.twimg.com',
},
{
protocol: 'https',
hostname: 'static.vecteezy.com',
},
],
},
async headers() {
return [
{
source: '/(.*)?', // Matches all pages
headers: [
{
key: 'X-Frame-Options',
value: 'DENY',
},
],
},
{
source: '/.well-known/apple-app-site-association',
headers: [{ key: 'content-type', value: 'application/json' }],
},
];
},
};
export default nextConfig;