Files
manoon-headless/next.config.ts
Unchained e87c655a5b
Some checks failed
Build and Deploy / build (push) Has been cancelled
Merge branch 'feature/web-vitals-optimization' into dev
2026-03-31 13:22:45 +02:00

77 lines
2.0 KiB
TypeScript

import createNextIntlPlugin from "next-intl/plugin";
import type { NextConfig } from "next";
const withNextIntl = createNextIntlPlugin();
const nextConfig: NextConfig = {
output: 'standalone',
async rewrites() {
const rybbitHost = process.env.NEXT_PUBLIC_RYBBIT_HOST || "https://rybbit.nodecrew.me";
const openpanelUrl = process.env.OPENPANEL_API_URL || "https://op.nodecrew.me/api";
const openpanelScriptUrl = "https://op.nodecrew.me";
return [
{
source: "/api/script.js",
destination: `${rybbitHost}/api/script.js`,
},
{
source: "/api/track",
destination: `${rybbitHost}/api/track`,
},
{
source: "/api/site/tracking-config/:id",
destination: `${rybbitHost}/api/site/tracking-config/:id`,
},
{
source: "/api/replay.js",
destination: `${rybbitHost}/api/replay.js`,
},
{
source: "/api/session-replay/record/:id",
destination: `${rybbitHost}/api/session-replay/record/:id`,
},
{
source: "/api/op/track",
destination: `${openpanelUrl}/track`,
},
];
},
images: {
formats: ["image/avif", "image/webp"],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
remotePatterns: [
{
protocol: "https",
hostname: "manoonoils.com",
pathname: "/**",
},
{
protocol: "https",
hostname: "minio-api.nodecrew.me",
pathname: "/**",
},
{
protocol: "https",
hostname: "api.manoonoils.com",
pathname: "/**",
},
{
protocol: "https",
hostname: "**.saleor.cloud",
pathname: "/**",
},
{
protocol: "https",
hostname: "images.unsplash.com",
pathname: "/**",
},
],
},
experimental: {
optimizePackageImports: ["lucide-react", "framer-motion"],
},
};
export default withNextIntl(nextConfig);