Files
latosa-escrima/frontend/next.config.ts

30 lines
580 B
TypeScript

import type { NextConfig } from "next";
const apiUrl =
process.env.NODE_ENV !== "production"
? `http://localhost:${process.env.BACKEND_PORT ?? 3001}`
: `https://${process.env.SERVER_NAME}/api`;
const nextConfig: NextConfig = {
/* config options here */
output: "standalone",
images: {
remotePatterns: [
{
protocol: "https",
hostname: "avatar.vercel.sh",
},
{
protocol: "http",
hostname: "localhost",
},
],
},
env: {
NEXT_PUBLIC_BACKEND_PORT: process.env.BACKEND_PORT,
NEXT_PUBLIC_API_URL: apiUrl,
},
};
export default nextConfig;