forked from onecli/onecli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
27 lines (25 loc) · 974 Bytes
/
Copy pathnext.config.js
File metadata and controls
27 lines (25 loc) · 974 Bytes
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
const isCloud = process.env.NEXT_PUBLIC_EDITION === "cloud";
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
compress: !isCloud, // Cloud: CloudFront handles compression at the edge; OSS: Next.js compresses
serverExternalPackages: ["@onecli/db"],
env: {
NEXT_PUBLIC_EDITION: process.env.NEXT_PUBLIC_EDITION || "oss",
NEXT_PUBLIC_GATEWAY_URL: process.env.NEXT_PUBLIC_GATEWAY_URL,
},
turbopack: {
resolveAlias: isCloud
? {
"@/lib/auth/auth-provider": "@/cloud/auth/cognito-provider",
"@/lib/auth/auth-server": "@/cloud/auth/cognito-server",
"@/lib/nav-items": "@/cloud/nav-items",
"@/lib/crypto": "@/cloud/kms-crypto",
"@/lib/gateway-auth": "@/cloud/gateway-auth",
"@/lib/settings-nav-items": "@/cloud/settings-nav-items",
"@/lib/auth/login-content": "@/cloud/auth/login-content",
}
: {},
},
};
export default nextConfig;