fix(api): 强制转换 cron 路由为动态渲染,修复构建期预执行崩溃

This commit is contained in:
kennethcheng 2026-05-03 15:26:16 +08:00
parent c3d49f74b6
commit a06b993558
5 changed files with 4 additions and 3 deletions

View File

@ -3,6 +3,7 @@ import { reconstructPortfolioHistory } from '@/actions/snapshots';
import { revalidatePath } from 'next/cache'; import { revalidatePath } from 'next/cache';
export const dynamic = 'force-dynamic'; export const dynamic = 'force-dynamic';
export const fetchCache = 'force-no-store';
export const runtime = 'nodejs'; export const runtime = 'nodejs';
export const maxDuration = 3600; export const maxDuration = 3600;

View File

@ -5,6 +5,7 @@ import { inArray } from 'drizzle-orm';
import { ProxyAgent, setGlobalDispatcher } from 'undici'; import { ProxyAgent, setGlobalDispatcher } from 'undici';
export const dynamic = 'force-dynamic'; export const dynamic = 'force-dynamic';
export const fetchCache = 'force-no-store';
export const runtime = 'nodejs'; export const runtime = 'nodejs';
function formatDateStr(date: Date): string { function formatDateStr(date: Date): string {

View File

@ -4,6 +4,7 @@ import { exchangeRatesHistory } from '@/db/schema';
import { ProxyAgent, setGlobalDispatcher } from 'undici'; import { ProxyAgent, setGlobalDispatcher } from 'undici';
export const dynamic = 'force-dynamic'; export const dynamic = 'force-dynamic';
export const fetchCache = 'force-no-store';
export const runtime = 'nodejs'; export const runtime = 'nodejs';
const CURRENCIES = [ const CURRENCIES = [

View File

@ -10,6 +10,7 @@ import { and, asc, desc, eq, lte } from 'drizzle-orm';
import Big from 'big.js'; import Big from 'big.js';
export const dynamic = 'force-dynamic'; export const dynamic = 'force-dynamic';
export const fetchCache = 'force-no-store';
export const runtime = 'nodejs'; export const runtime = 'nodejs';
function formatDateString(date: Date): string { function formatDateString(date: Date): string {

View File

@ -3,9 +3,6 @@ import type { NextConfig } from "next";
const nextConfig: NextConfig = { const nextConfig: NextConfig = {
output: 'standalone', output: 'standalone',
eslint: {
ignoreDuringBuilds: true,
},
typescript: { typescript: {
ignoreBuildErrors: true, ignoreBuildErrors: true,
}, },