mirror of
https://github.com/hanzoai/store.git
synced 2026-10-30 14:54:46 +00:00
The convergence stopped one page short. `app/apps/[id]/page-client.tsx` was still the shadcn original — Tailwind utility classes on every element and an import of `@hanzo/ui/badge`, a subpath the 8.x package does not export, so the build could not resolve it at all. It is now written the way the rest of the store is: @hanzo/gui stacks and type inside the cards, plain CSS in globals.css for the things that position the page (the two-column split, the hero icon, the code blocks). Three duplications went with it: - The mark-plus-way-back that the documents and the app page both wear is now `StoreMark`, stated once in site-chrome. - The store → desktop hand-off had two spellings — `hanzo://install/<id>?…` in the grid and `hanzo://config?tool=…` on the app page. One protocol, one truth: `lib/install-url.ts`. Both call sites are anchors now, so the grid's imperative `window.location.href` closure is gone. - The 4rem card icon and the 6rem page icon are one `.app-icon` rule and a size modifier. And one silently-ignored prop, the failure mode gui has no error for: `fontFamily="$mono"` in the footer named a token that does not exist. The config declares two families, body and heading — there is no mono — so the text rendered in Geist Sans and nothing said so. Mono lives in theme.css, which typesets `code`; the footer uses `<code>`. Two dependency facts the build needed: - `@coinbase/cdp-sdk`, reached through wagmi's Base Account connector, imports the `@x402/*` payment SDKs unconditionally while declaring them optional peers. The store never signs an x402 payment and does not install them, and webpack resolves statically, so "optional" did not save it. They resolve to webpack's `fallback: false` — absent module, empty module. - @hanzo/ui's icons need `react-native-svg`, whose peer floor is react ^19.2.3; react moves 19.0.0 → 19.2.8 to meet it. Same pair the console and hanzo.ai already carry. Verified: `next build` compiles and exports 209 static pages. Co-authored-by: Hanzo Dev <[email protected]>
55 lines
2.1 KiB
JavaScript
55 lines
2.1 KiB
JavaScript
// Plain ESM, not next.config.ts — deliberately. Next loads a TypeScript config
|
|
// through the TypeScript compiler API, which makes config LOADING depend on
|
|
// which TypeScript is installed; on the native TS 7 compiler that dies before
|
|
// anything compiles. As ESM the config is a plain object Next reads natively,
|
|
// and the type comes from a JSDoc annotation. `pnpm typecheck` runs tsgo; this
|
|
// file is never on either path.
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
output: 'export',
|
|
images: {
|
|
unoptimized: true,
|
|
},
|
|
// @hanzo/gui and the @hanzo/ui components built on it ship untranspiled ESM
|
|
// with react-native module resolution. Next has to compile them and resolve
|
|
// `react-native` to the web implementation — this is the whole browser story
|
|
// for the gui substrate, and it is the same list every Hanzo Next app carries.
|
|
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 || []),
|
|
]
|
|
// `@coinbase/cdp-sdk`, reached through wagmi's Base Account connector,
|
|
// declares the `@x402/*` payment SDKs as OPTIONAL peers and imports them
|
|
// unconditionally. The store never signs an x402 payment, so they are not
|
|
// installed — and webpack resolves imports statically, so "optional" alone
|
|
// does not stop it failing the build. `fallback` is webpack's name for
|
|
// exactly this: absent module, empty module.
|
|
config.resolve.fallback = {
|
|
...config.resolve.fallback,
|
|
'@x402/core': false,
|
|
'@x402/evm': false,
|
|
'@x402/svm': false,
|
|
'@x402/extensions': false,
|
|
}
|
|
return config
|
|
},
|
|
eslint: {
|
|
ignoreDuringBuilds: true,
|
|
},
|
|
}
|
|
|
|
export default nextConfig
|