- Font optimization: Replace @font-face with next/font/google (DM Sans, Inter) for faster font loading and no render-blocking - Image optimization: Add Unsplash to remotePatterns, configure AVIF/WebP formats, add device/image sizes - Convert native <img> tags to next/image with proper sizing and priority for LCP images - Add optimizePackageImports for lucide-react and framer-motion to reduce bundle size - Fix CLS: Urgency message uses fixed min-height instead of animated height - Fix CLS: ProductCard quick-add button uses opacity instead of translate for hover - Convert HeroVideo scroll indicator to CSS animation - Script loading: Rybbit uses lazyOnload strategy for better INP
71 lines
1.7 KiB
TypeScript
71 lines
1.7 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";
|
|
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`,
|
|
},
|
|
];
|
|
},
|
|
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);
|