mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
- 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
43 lines
1.1 KiB
TypeScript
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);
|