-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
58 lines (53 loc) · 1.38 KB
/
next.config.ts
File metadata and controls
58 lines (53 loc) · 1.38 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
import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
experimental: {
optimizePackageImports: [
'motion',
'lucide-react',
'react-icons',
'@radix-ui/react-slot',
'class-variance-authority',
'clsx',
'tailwind-merge',
'tailwindcss-animate',
'zod',
'@aws-sdk/client-s3',
'@aws-sdk/s3-request-presigner',
'drizzle-orm',
'ioredis',
'posthog-js',
'posthog-node',
],
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'slickage-website.s3.us-west-2.amazonaws.com',
pathname: '/images/**',
},
],
formats: ['image/webp', 'image/avif'],
qualities: [85],
minimumCacheTTL: 60 * 60 * 24 * 30, // 30 days
dangerouslyAllowSVG: true,
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
},
compress: true,
poweredByHeader: false,
allowedDevOrigins: ['us.posthog.com', 'us.i.posthog.com', 'us-assets.i.posthog.com'],
// Reverse proxy for PostHog to bypass ad blockers and improve data collection
async rewrites() {
return [
{
source: '/ingest/:path*',
destination: 'https://us.i.posthog.com/:path*',
},
{
source: '/static/:path*',
destination: 'https://us-assets.i.posthog.com/static/:path*',
},
];
},
};
export default nextConfig;