1851d2ed47
Add TimeToLeave feature checklist and plan
24 lines
722 B
TypeScript
24 lines
722 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
allowedDevOrigins: ['100.107.92.66'],
|
|
serverExternalPackages: ["node-ical"],
|
|
env: {
|
|
CORS_ALLOWED_ORIGINS: process.env.CORS_ALLOWED_ORIGINS,
|
|
DEPLOYMENT_URL: process.env.DEPLOYMENT_URL,
|
|
},
|
|
};
|
|
|
|
// Validate environment variables at build time
|
|
if (process.env.NODE_ENV === 'production' && !process.env.SKIP_ENV_VALIDATION) {
|
|
if (!process.env.CORS_ALLOWED_ORIGINS) {
|
|
throw new Error('Missing CORS_ALLOWED_ORIGINS environment variable in production');
|
|
}
|
|
if (!process.env.DEPLOYMENT_URL) {
|
|
throw new Error('Missing DEPLOYMENT_URL environment variable in production');
|
|
}
|
|
}
|
|
|
|
export default nextConfig;
|