import { withContentlayer } from 'next-contentlayer2' /** @type {import('next').NextConfig} */ const nextConfig = { transpilePackages: ['ui', 'common', 'shared-data', 'icons', 'tsconfig'], basePath: process.env.NEXT_PUBLIC_BASE_PATH, async redirects() { return [ ...(process.env.NEXT_PUBLIC_BASE_PATH?.length ? [ { source: '/', destination: process.env.NEXT_PUBLIC_BASE_PATH, basePath: false, permanent: false, }, ] : []), // Add a redirect to make the custom block for tanstack-db { source: '/r/tanstack-db-nextjs.json', destination: '/api/registry/tanstack-db', permanent: true, }, ] }, eslint: { // We are already running linting via GH action, this will skip linting during production build on Vercel ignoreDuringBuilds: true, }, } export default withContentlayer(nextConfig)