wealth/apps/bear/next.config.ts

36 lines
946 B
TypeScript
Raw Normal View History

2026-10-02 14:19:11 +00:00
import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
// Workspace packages export TypeScript source, so Next.js compiles them.
transpilePackages: [
'@lumina/market',
'@lumina/integrations',
'@lumina/island',
'@lumina/libs',
'@lumina/tools',
],
// `/@{username}` is the public channel URL. A folder named `@…` is a
// parallel-route slot in the App Router, so the routes live under
// `channels/[username]` and the public URL is rewritten onto them.
async rewrites() {
return [
{
source: '/@:username/:path*',
destination: '/channels/:username/:path*',
},
];
},
// One canonical URL per channel: send direct `/channels/…` hits to `/@…`.
async redirects() {
return [
{
source: '/channels/:username/:path*',
destination: '/@:username/:path*',
permanent: true,
},
];
},
};
export default nextConfig;