forked from Codehagen/Proppi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
65 lines (62 loc) · 1.97 KB
/
next.config.ts
File metadata and controls
65 lines (62 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import { withPostHogConfig } from '@posthog/nextjs-config'
import type { NextConfig } from 'next'
const isDev = process.env.NODE_ENV === 'development'
const nextConfig: NextConfig = {
/* config options here */
async rewrites() {
return [
{
source: '/ingest/static/:path*',
destination: 'https://us-assets.i.posthog.com/static/:path*',
},
{
source: '/ingest/:path*',
destination: 'https://us.i.posthog.com/:path*',
},
]
},
// This is required to support PostHog trailing slash API requests
skipTrailingSlashRedirect: true,
...(isDev && { assetPrefix: '/realtylens' }),
images: {
...(isDev && { path: '/realtylens/_next/image' }),
remotePatterns: [
{
protocol: 'https',
hostname: 'picsum.photos',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'images.unsplash.com',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: '*.supabase.co',
port: '',
pathname: '/storage/v1/object/public/**',
},
{
protocol: 'https',
hostname: '*.brown-ling.ts.net',
port: '',
pathname: '/**',
},
],
},
typescript: { ignoreBuildErrors: true },
allowedDevOrigins: ['*.brown-ling.ts.net'],
}
export default withPostHogConfig(nextConfig, {
personalApiKey: process.env.POSTHOG_PERSONAL_KEY!, // Your personal API key from PostHog settings
envId: process.env.POSTHOG_ENV_ID!, // Your environment ID (project ID)
host: process.env.NEXT_PUBLIC_POSTHOG_HOST, // Optional: Your PostHog instance URL, defaults to https://us.posthog.com
sourcemaps: {
enabled: true, // Optional: Enable sourcemaps generation and upload, defaults to true on production builds
project: 'RealtyLens', // Optional: Project name, defaults to git repository name
deleteAfterUpload: true, // Optional: Delete sourcemaps after upload, defaults to true
},
})