Some tweaks

This commit is contained in:
cdricms
2026-03-21 11:53:25 +01:00
parent 4cf85981eb
commit 83eddf89cd
5 changed files with 22 additions and 32 deletions

View File

@@ -1,41 +1,19 @@
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 */
transpilePackages: ['@mdxeditor/editor'],
transpilePackages: ["@mdxeditor/editor"],
output: "standalone",
compiler: {
removeConsole: process.env.NODE_ENV === "production",
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "img.youtube.com",
},
{
protocol: "https",
hostname: "avatar.vercel.sh",
},
{
protocol: "http",
hostname: "localhost",
},
{
protocol: "https",
hostname: "latosa.cems.dev",
},
{ protocol: "https", hostname: "img.youtube.com" },
{ protocol: "https", hostname: "avatar.vercel.sh" },
{ protocol: "http", hostname: "localhost" },
{ protocol: "https", hostname: "latosa.cems.dev" },
],
},
env: {
NEXT_PUBLIC_BACKEND_PORT: process.env.BACKEND_PORT,
NEXT_PUBLIC_API_URL: apiUrl,
},
};
export default nextConfig;