-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
54 lines (52 loc) · 1.67 KB
/
Copy pathnext.config.js
File metadata and controls
54 lines (52 loc) · 1.67 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
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
* for Docker builds.
*/
import './src/env.js';
/** @type {import("next").NextConfig} */
const config = {
output: 'standalone',
reactCompiler: true,
env: {
// Embed environment variables at build time
CLERK_SECRET_KEY: process.env.CLERK_SECRET_KEY,
CLERK_FRONTEND_API_URL: process.env.CLERK_FRONTEND_API_URL,
CLERK_JWT_ISSUER_DOMAIN: process.env.CLERK_JWT_ISSUER_DOMAIN,
CONVEX_DEPLOYMENT: process.env.CONVEX_DEPLOYMENT,
NEXT_PUBLIC_CONVEX_URL: process.env.NEXT_PUBLIC_CONVEX_URL,
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY:
process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'images.unsplash.com'
},
{
protocol: 'https',
hostname: 'img.clerk.com'
},
{
protocol: 'https',
hostname: '*.convex.cloud'
},
{
protocol: 'https',
hostname: '*.convex.site'
}
]
},
// Performance optimizations
experimental: {
// Optimize package imports for smaller bundles
optimizePackageImports: ['@clerk/nextjs', '@hugeicons/react', 'convex']
},
// Modern browser targets to reduce polyfills (~11 KiB savings)
// Targets browsers with ES2020+ support
compiler: {
// Remove console.log in production
removeConsole: process.env.NODE_ENV === 'production'
}
};
export default config;