Files
docs/next.config.ts
zeekayandHanzo Dev 7d82a2c72a The docs are native: gui primitives, design tokens, and the real mark
@hanzo/docs 17 replaces the Tailwind/Base-UI stack. The home page now
says what Zoo is — mission, DSO and PoAI with their papers, ecosystem,
community — in gui primitives under a real nav, instead of a template's
demo cards. Static search gains its index; the logo is the three-circle
mark; linked headings paint at their own size.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-16 23:31:50 -07:00

50 lines
1.8 KiB
TypeScript

import { createMDX } from '@hanzo/docs/mdx/next';
import type { NextConfig } from 'next';
const config: NextConfig = {
// GitHub Pages serves the exported `out/` directory; there is no server.
output: 'export',
reactStrictMode: true,
// @hanzo/gui and its primitives ship untranspiled ESM against react-native
// module resolution. Next compiles them and resolves `react-native` to the web
// implementation — that is the whole browser story for the gui substrate.
transpilePackages: ['@hanzo/gui', '@hanzo/ui', 'react-native-web'],
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
'react-native$': 'react-native-web',
};
// `.web.*` first is what makes the react-native ecosystem resolve its web
// variants; without it a package resolves its native entry and webpack
// chokes on React Native's Flow source.
config.resolve.extensions = [
'.web.tsx',
'.web.ts',
'.web.jsx',
'.web.js',
...(config.resolve.extensions || []),
];
// react-native-svg, reached through the icons, imports the native asset
// registry to resolve an image asset's URI. A web build never takes that
// path, and webpack resolves imports statically — so an unused import is
// still a failed build. `fallback` is webpack's name for exactly this:
// absent module, empty module.
config.resolve.fallback = {
...config.resolve.fallback,
'@react-native/assets-registry/registry': false,
};
return config;
},
serverExternalPackages: ['shiki'],
images: {
unoptimized: true,
},
};
// No outDir: `docs-mdx` (the CLI, run before the build) and this plugin both
// write the framework's default `docs/`. Naming one of them moves only that one
// and leaves the other's copy behind.
const withMDX = createMDX();
export default withMDX(config);