mirror of
https://github.com/hanzoai/hanzo.industries.git
synced 2026-10-30 14:39:32 +00:00
`@hanzogui/config` and `@hanzogui/next-theme` were direct dependencies that no file imports. The app has one gui config (`@hanzo/ui/gui-config`, via GuiProvider) and one theme system (`next-themes`), so these were the pre-8.x answers to two questions that already have answers. Nothing in the lockfile depends on them either. Removing them exposes `guiPackages()` in next.config as dead: it scanned `node_modules/@hanzogui` to transpile "every installed @hanzogui/*", but under pnpm that directory holds only this project's DIRECT dependencies — @hanzo/gui's own ~64 are down in the store, never in scope. The scan could only ever return the two packages just deleted, and it now returns nothing. `transpilePackages` names the two packages this app actually imports. `scripts/detailwind.mjs` was the one-shot Tailwind codemod. It has been run, the site is on `@hanzo/design` tokens plus `app/system.css`, and a spent migration tool that still ships its 30-number Tailwind mapping tables is both the last Tailwind surface in the tree and a live footgun aimed at already-migrated source. It stays recoverable at8a3fe76. (cherry picked from commit2ae836c70c) Co-authored-by: Hanzo Dev <[email protected]>
45 lines
1.9 KiB
JavaScript
45 lines
1.9 KiB
JavaScript
/**
|
|
* @hanzo/gui is consumed at runtime — Next's own `transpilePackages` plus the
|
|
* provider's runtime CSS injection, the same arrangement `sites` and the console
|
|
* use: the published gui next-plugin has a broken dependency, and the optimizing
|
|
* compiler is an optimization, not a requirement.
|
|
*
|
|
* Plain ESM, not `.ts`, on purpose. Next loads a `.ts` config through
|
|
* TypeScript's JavaScript API, and this config never needed a compiler to begin
|
|
* with — it is a dozen lines of Node. Types still hold: the JSDoc annotation
|
|
* below is checked by `tsc --noEmit` like any other file.
|
|
*/
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const config = {
|
|
output: 'export',
|
|
images: { unoptimized: true },
|
|
trailingSlash: false,
|
|
// ONE typechecker: `prebuild` runs `tsc --noEmit` over the whole tree before
|
|
// every build, so letting Next start a second in-process pass would only
|
|
// re-check what is already checked, slower.
|
|
typescript: { ignoreBuildErrors: true },
|
|
eslint: { ignoreDuringBuilds: true },
|
|
// The two packages this app imports. Their own `@hanzogui/*` dependencies are
|
|
// published compiled and are NOT listed: under pnpm they are not in this
|
|
// project's `node_modules/@hanzogui` at all, so a directory scan for them
|
|
// could only ever have found the app's own direct dependencies.
|
|
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,
|
|
]
|
|
return config
|
|
},
|
|
}
|
|
|
|
export default config
|