Files
credit/next.config.js
zeekay 7c025fb437 Put the boundary where the engine is
A module renders through @hanzo/gui, the engine holds its theme in React
context, and a module that reaches context is a client module — so the rule is
what a file reaches, not which folder it sits in. Marking a folder swept up the
logic files beside the components; marking only hook use left the components
evaluating the engine on the server.

The four class-name functions move to style.ts, outside the boundary: a page
computing a button's classes on the server was calling across it, which React
reports as "Invalid reference" from a component nobody wrote. The viewport
constant moves for the same reason — Next reads it on the server.

A block type registered into a map at run time is never named by the client
graph, so nothing is emitted for it; the page that registers now renders on the
same side as the components it registers.
2026-08-29 11:59:03 -07:00

40 lines
981 B
JavaScript

const withGui = require('@hanzo/ui/next')
const withMDX = require('@next/mdx')()
const watchPluginConfig = require('./next-conf/watch.next.config')
/** @type {import('next').NextConfig} */
const nextConfig = {
pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'],
reactStrictMode: true,
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'img.youtube.com',
pathname: '**',
},
{
protocol: 'https',
hostname: 'cdn.lux.network',
pathname: '**',
},
{
protocol: "http",
hostname: "localhost",
}
],
},
// https://stackoverflow.com/questions/72621835/how-to-fix-you-may-need-an-appropriate-loader-to-handle-this-file-type-current
transpilePackages: [
'@hanzo/auth',
'@hanzo/commerce',
'@luxfi/data',
'@luxfi/ui',
'@luxfi/menu-icons',
],
productionBrowserSourceMaps: true,
}
module.exports = withGui(withMDX(nextConfig), __dirname)