mirror of
https://github.com/hanzoai/site.git
synced 2026-11-20 21:00:01 +00:00
* Turn on strict and stop hiding type errors in the build tsc --noEmit --strict is clean after the lib and pages slices, so tsconfig strict is now true and next.config.ts no longer sets ignoreBuildErrors: the build (`pnpm build` in hanzo.yml) fails on any type error from here on. The last 11 errors: telemetry's useEnter is generic over the element and returns a tuple, the Hold context value is typed, FilmHead's inn is the data-in string, the blockchain page and the DesignPage opener handle a missing value. *.tsbuildinfo is ignored. Testing: tsc --noEmit (strict) 0 errors; npm test 56 pass. Risk: low; a later change that adds a type error now fails CI instead of shipping. How to revert: git revert this commit. Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk * Type the plans snapshot in plans.test.ts as a map of plans The test drops Ultimate and Unlimited from the snapshot to prove the slider stops at Ultra. It destructured them from the imported JSON, so its types followed whatever prices the prebuild fetched: a live catalog without those two plans failed `next build` type-checking in CI. Reading the snapshot as Record<string, Plan> says what the test means, whatever the catalog holds. Testing: tsc --noEmit clean with the committed snapshot and with Ultimate and Unlimited removed from it; npm test passes. Risk: none; test-only. How to revert: git revert this commit. Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk
10 lines
985 B
TypeScript
10 lines
985 B
TypeScript
// Production: a static export of every page (out/). Live dev (npm run dev): its own build folder, hot reload, and any
|
|
// file this repo lacks — Hanzo's /public images and media — is fetched from hanzo.ai so pages look complete. Only files
|
|
// are proxied; an unknown page shows this repo's own 404, as it will in production.
|
|
const dev = !!process.env.HZ_DEV;
|
|
export default dev
|
|
? { distDir: '.next-dev', turbopack: { root: import.meta.dirname }, images: { unoptimized: true }, devIndicators: false, agentRules: false, async rewrites() { return { fallback: [{ source: '/:file(.+\\.[a-zA-Z0-9]{2,5})', destination: 'https://hanzo.ai/:file' }] }; } }
|
|
// The build's own files are served under /assets: hanzo.ai's /_next is the app's, whose sign-in pages the edge
|
|
// serves here (universe sites.yaml hanzo-ai). The build writes them to out/_next; `build` moves them under it.
|
|
: { output: 'export', assetPrefix: '/assets', images: { unoptimized: true }, devIndicators: false };
|