Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / apps/web/next.config.ts |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | apps/web/next.config.ts |
| Original SHA-256 | 5e7adca2009a6cdaf582c8f38568b90e561c1448e444f5cf5268004793d2ea4a |
| Git blob SHA | 933da384e7e0c396a38cb3305ae8a7bb1876941f |
| Reading-copy SHA-256 | 5e7adca2009a6cdaf582c8f38568b90e561c1448e444f5cf5268004793d2ea4a |
Recovered source transcript
Download complete source text ↓115 lines · 3.0 KB
import { withContentCollections } from '@content-collections/next'
import withMDX from '@next/mdx'
import { baseConfig, withAnalyzer, withVercelToolbarConfig } from '@thedaviddias/config-next'
import { withSentry } from '@thedaviddias/observability/next-config'
import type { NextConfig } from 'next'
import { env } from '@/env'
export const INTERNAL_PACKAGES = [
'@thedaviddias/design-system',
'@thedaviddias/analytics',
'@thedaviddias/auth',
'@thedaviddias/caching',
'@thedaviddias/config-next',
'@thedaviddias/config-typescript',
'@thedaviddias/logging',
'@thedaviddias/utils',
'@thedaviddias/content'
]
let nextConfig: NextConfig = {
...baseConfig,
transpilePackages: INTERNAL_PACKAGES,
experimental: {
prefetchInlining: true
},
pageExtensions: ['mdx', 'ts', 'tsx'],
// Configure logging behavior
logging: {
fetches: {
fullUrl: process.env.NODE_ENV === 'development'
}
},
// Configure Turbopack (default bundler in Next.js 16)
turbopack: {
resolveExtensions: ['.mdx', '.tsx', '.ts', '.jsx', '.js', '.mjs', '.json'],
resolveAlias: {
crypto: { browser: './turbopack-empty.ts' },
stream: { browser: './turbopack-empty.ts' },
buffer: { browser: './turbopack-empty.ts' },
util: { browser: './turbopack-empty.ts' },
fs: { browser: './turbopack-empty.ts' },
path: { browser: './turbopack-empty.ts' },
'node:crypto': { browser: './turbopack-empty.ts' },
'node:stream': { browser: './turbopack-empty.ts' },
'node:buffer': { browser: './turbopack-empty.ts' },
'node:util': { browser: './turbopack-empty.ts' },
'node:fs': { browser: './turbopack-empty.ts' },
'node:path': { browser: './turbopack-empty.ts' }
}
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'www.google.com',
pathname: '/s2/favicons/**'
},
{
protocol: 'https',
hostname: 't0.gstatic.com',
pathname: '/faviconV2/**'
},
{
protocol: 'https',
hostname: 'avatars.githubusercontent.com',
pathname: '/u/**'
},
{
protocol: 'https',
hostname: 'icon.horse',
pathname: '/icon/**'
}
]
},
redirects: async () => {
return [
{
source: '/news',
destination: '/',
permanent: false
},
{
source: '/website/:path*',
destination: '/websites/:path*',
permanent: true
},
{
// Redirect old website URLs to new ones with -llms-txt suffix
source: '/websites/:slug((?!.*-llms-txt).*)',
destination: '/websites/:slug-llms-txt',
permanent: true
}
]
}
}
// Apply other plugins first
nextConfig = withVercelToolbarConfig(nextConfig)
nextConfig = withSentry(nextConfig)
nextConfig = withMDX()(nextConfig)
if (env.ANALYZE === 'true') {
nextConfig = withAnalyzer(nextConfig)
}
// withContentCollections must be the outermost wrapper
export default withContentCollections(nextConfig)