chatbot-template/next.config.ts

28 lines
655 B
TypeScript
Raw Normal View History

import { withBotId } from "botid/next/config";
import type { NextConfig } from "next";
2024-10-23 12:21:30 -04:00
2026-03-13 23:39:12 +00:00
const isDemo = process.env.IS_DEMO === "1";
const basePath = isDemo ? "/demo" : "";
2026-02-23 08:26:37 -08:00
2024-10-23 12:21:30 -04:00
const nextConfig: NextConfig = {
2026-03-13 23:39:12 +00:00
...(isDemo && { basePath, assetPrefix: "/demo-assets" }),
2026-02-23 08:26:37 -08:00
env: {
NEXT_PUBLIC_BASE_PATH: basePath,
},
2025-11-29 13:21:34 +00:00
cacheComponents: true,
2024-10-23 12:21:30 -04:00
images: {
remotePatterns: [
{
hostname: "avatar.vercel.sh",
},
{
protocol: "https",
//https://nextjs.org/docs/messages/next-image-unconfigured-host
hostname: "*.public.blob.vercel-storage.com",
},
],
2024-10-23 12:21:30 -04:00
},
};
export default withBotId(nextConfig);