-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
58 lines (57 loc) · 1.41 KB
/
next.config.mjs
File metadata and controls
58 lines (57 loc) · 1.41 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
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{
protocol: "https",
hostname: "placehold.co",
port: "",
pathname: "/**",
},
{
protocol: "https",
hostname: "replicate.com",
},
{
protocol: "https",
hostname: "replicate.delivery",
},
{
protocol: "https",
hostname: "firebasestorage.googleapis.com",
},
],
dangerouslyAllowSVG: true,
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
},
// Add production optimizations
swcMinify: true,
compiler: {
removeConsole: process.env.NODE_ENV === 'production' ? {
exclude: ['error', 'warn'],
} : false,
},
// Handle environment variables
env: {
NEXT_PUBLIC_APP_VERSION: process.env.npm_package_version,
},
// Output as standalone for easier deployment
output: 'standalone',
// Make sure Next.js loads environment variables from .env.local
experimental: {
esmExternals: 'loose',
serverComponentsExternalPackages: ['openai'],
},
typescript: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
// your project has type errors.
// !! WARN !!
ignoreBuildErrors: true,
},
eslint: {
// Similar setting for ESLint errors
ignoreDuringBuilds: true,
},
};
export default nextConfig;