-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
58 lines (55 loc) · 1.37 KB
/
next.config.js
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
import { withPayload } from '@payloadcms/next/withPayload'
import redirects from './redirects.js'
const NEXT_PUBLIC_SERVER_URL =
process.env.NEXT_PUBLIC_SERVER_URL ||
(process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : 'http://localhost:3000')
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
redirects,
images: {
domains: ['spaces.kendev.co', 'localhost'],
loader: 'default',
remotePatterns: [
{
protocol: 'https',
hostname: 'spaces.kendev.co',
pathname: '/media/**',
},
{
protocol: 'https',
hostname: 'spaces.kendev.co',
pathname: '/api/media/file/**',
},
{
protocol: 'https',
hostname: 'spaces.kendev.co',
pathname: '/api/spaces-media/**',
},
{
protocol: 'http',
hostname: 'localhost',
port: '3000',
pathname: '/media/**',
},
{
protocol: 'http',
hostname: 'localhost',
port: '3000',
pathname: '/api/media/file/**',
},
{
protocol: 'http',
hostname: 'localhost',
port: '3000',
pathname: '/api/spaces-media/**',
},
],
},
output: 'standalone',
env: {
NEXT_PUBLIC_SERVER_URL,
PAYLOAD_PUBLIC_SERVER_URL: NEXT_PUBLIC_SERVER_URL,
},
}
export default withPayload(nextConfig)