| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- import type { NextConfig } from "next";
- /**
- * @briven/auth: package exports are fixed to dist/ after install
- * (see scripts/fix-briven-auth-exports.mjs). Do not alias "@briven/auth"
- * alone — webpack treats it as a prefix and breaks "@briven/auth/react".
- */
- const nextConfig: NextConfig = {
- transpilePackages: ["@briven/auth", "@krypco/mavi-core"],
- // Local dev: allow both localhost and 127.0.0.1
- allowedDevOrigins: ["127.0.0.1", "localhost"],
- // Tree-shake heavy wallet packages (Phase 6 light performance)
- experimental: {
- optimizePackageImports: ["wagmi", "viem", "@wagmi/connectors"],
- },
- async redirects() {
- return [
- // Old / alternate magic-link paths → verify landing
- {
- source: "/verify",
- destination: "/auth/verify",
- permanent: false,
- },
- {
- source: "/login/verify",
- destination: "/auth/verify",
- permanent: false,
- },
- {
- source: "/explorer",
- destination: "/portal/explorer",
- permanent: false,
- },
- {
- source: "/architecture",
- destination: "/portal/architecture",
- permanent: false,
- },
- {
- source: "/connect-wallet",
- destination: "/portal/connect-wallet",
- permanent: false,
- },
- {
- source: "/dashboard",
- destination: "/portal/dashboard",
- permanent: false,
- },
- {
- source: "/docs",
- destination: "/portal/docs",
- permanent: false,
- },
- {
- source: "/services",
- destination: "/portal/services",
- permanent: false,
- },
- {
- source: "/mavi",
- destination: "/portal/mavi",
- permanent: false,
- },
- {
- source: "/mavi/create",
- destination: "/portal/mavi/create",
- permanent: false,
- },
- {
- source: "/mavi/import",
- destination: "/portal/mavi/import",
- permanent: false,
- },
- {
- source: "/mavi/send",
- destination: "/portal/mavi/send",
- permanent: false,
- },
- {
- source: "/mavi/receive",
- destination: "/portal/mavi/receive",
- permanent: false,
- },
- {
- source: "/mavi/activity",
- destination: "/portal/mavi/activity",
- permanent: false,
- },
- ];
- },
- };
- export default nextConfig;
|