Browse Source

fix: TypeScript-ошибка в exportTokens, next.config.ts для Vercel

- colors/page.tsx: Record<string, unknown> вместо Record<string, string>
- next.config.ts: turbopack.root только в development (Vercel conflict fix)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sprint/3
AR 15 M4 1 week ago
parent
commit
657cc26d3e
  1. 2
      apps/web/app/foundation/colors/page.tsx
  2. 10
      apps/web/next.config.ts

2
apps/web/app/foundation/colors/page.tsx

@ -247,7 +247,7 @@ function ContrastRow({ pair }: { pair: typeof CONTRAST_PAIRS[0] }) {
/* ─── Экспорт токенов ──────────────────────────────────────────────── */ /* ─── Экспорт токенов ──────────────────────────────────────────────── */
function exportTokens() { function exportTokens() {
const tokens: Record<string, Record<string, string>> = { colors: {} }; const tokens: Record<string, Record<string, unknown>> = { colors: {} };
BRAND_COLORS.forEach(c => { BRAND_COLORS.forEach(c => {
const key = c.oracal !== "—" ? `brand-${c.oracal.toLowerCase()}` : "brand-white"; const key = c.oracal !== "—" ? `brand-${c.oracal.toLowerCase()}` : "brand-white";
const { r, g, b } = hexToRgb(c.hex); const { r, g, b } = hexToRgb(c.hex);

10
apps/web/next.config.ts

@ -1,10 +1,14 @@
import type { NextConfig } from "next"; import type { NextConfig } from "next";
import path from "path"; import path from "path";
const isDev = process.env.NODE_ENV === "development";
const nextConfig: NextConfig = { const nextConfig: NextConfig = {
turbopack: { ...(isDev && {
root: path.resolve(__dirname, "../.."), turbopack: {
}, root: path.resolve(__dirname, "../.."),
},
}),
}; };
export default nextConfig; export default nextConfig;

Loading…
Cancel
Save