Files
cozsweet-frontend-nextjs/next.config.ts
T
Codex cc9fb9f4fd
Docker Image / Quality and Bundle Budgets (push) Successful in 3s
Docker Image / Build and Push Docker Image (push) Successful in 1m55s
Add chat gifts and relationship diary UI
2026-07-21 17:41:30 +08:00

61 lines
1.5 KiB
TypeScript

import { withSentryConfig } from "@sentry/nextjs";
import type { NextConfig } from "next";
import { withSerwist } from "@serwist/turbopack";
import { LEGACY_GLOBAL_ROUTE_REDIRECTS } from "./src/router/legacy-global-route-redirects";
const nextConfig: NextConfig = {
// Docker runs the traced runtime emitted to `.next/standalone`.
output: "standalone",
async redirects() {
return [...LEGACY_GLOBAL_ROUTE_REDIRECTS];
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "platform-lookaside.fbsbx.com",
},
{
protocol: "https",
hostname: "graph.facebook.com",
},
{
protocol: "https",
hostname: "**.supabase.co",
pathname: "/storage/v1/object/**",
},
{
protocol: "https",
hostname: "dbapi.banlv-ai.com",
pathname: "/storage/v1/object/**",
},
{
protocol: "https",
hostname: "free.picui.cn",
},
],
},
};
const shouldUploadSentrySourcemaps =
process.env.CI !== "true" || process.env.SENTRY_UPLOAD_SOURCEMAPS === "1";
export default withSentryConfig(withSerwist(nextConfig), {
org: "shenzhen-banlv-zhidao-technolo",
project: "javascript-nextjs",
silent: !process.env.CI,
telemetry: false,
widenClientFileUpload: true,
// Validation builds keep source maps local; release jobs opt in to upload.
sourcemaps: {
disable: !shouldUploadSentrySourcemaps,
},
webpack: {
automaticVercelMonitors: true,
treeshake: {
removeDebugLogging: true,
},
},
});