Files
docs/apps/dev-docs/next.config.ts
zeekay db79428a77 feat: add dev-docs app for Hanzo Dev CLI documentation
- New Fumadocs-based docs app at apps/dev-docs/ (port 3003)
- Ported 16+ markdown docs from hanzoai/dev as MDX with navigation
- Landing page with terminal preview, features grid, quick start
- 28 docs pages: getting-started, usage, config, integrations, reference
- Static export to out/ with shiki code highlighting
- CI: add GITHUB_PAGES env, NODE_OPTIONS, SKIP_DTS for faster builds
2026-02-08 23:04:07 -08:00

43 lines
1.1 KiB
TypeScript

import { resolve } from 'path';
import createBundleAnalyzer from '@next/bundle-analyzer';
import { createMDX } from '@hanzo/docs/mdx/next';
import type { NextConfig } from 'next';
const withAnalyzer = createBundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
});
const config: NextConfig = {
output: 'export',
reactStrictMode: true,
typescript: {
// Types resolve correctly at runtime via docsLazy/AsyncDocCollectionEntry
// but TS inference breaks on the complex MDX runtime generics chain
ignoreBuildErrors: true,
},
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
'@hanzo/mdx:collections/server': resolve(__dirname, './docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './docs/dynamic.ts'),
};
return config;
},
logging: {
fetches: {
fullUrl: true,
},
},
serverExternalPackages: [
'shiki',
],
images: {
unoptimized: true,
},
};
const withMDX = createMDX();
export default withAnalyzer(withMDX(config as any) as NextConfig);