This repository was archived by the owner on Jul 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
147 lines (139 loc) · 3.43 KB
/
next.config.ts
File metadata and controls
147 lines (139 loc) · 3.43 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
import type { NextConfig } from "next";
const otelRegex = /@opentelemetry\/instrumentation/;
const baseConfig: NextConfig = {
images: {
formats: ["image/avif", "image/webp"],
remotePatterns: [
{
protocol: "https",
hostname: "**.googleusercontent.com",
},
{
protocol: "https",
hostname: "images.unsplash.com",
},
{
protocol: "https",
hostname: "cdn.weatherapi.com",
},
{
protocol: "https",
hostname: "*.clearbit.com",
},
{
protocol: "https",
hostname: "32bf4d9460f8d7a709cb811dd6373ffc.r2.cloudflarestorage.com",
},
],
},
// biome-ignore lint/suspicious/useAwait: rewrites is async
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*",
},
{
source: "/ingest/decide",
destination: "https://us.i.posthog.com/decide",
},
{
source: '/fa-kit-92824ea147/:path*',
destination: '/public/fa-kit-92824ea147/:path*',
},
];
},
webpack(config) {
config.ignoreWarnings = [{ module: otelRegex }];
// Allow importing of FontAwesome fonts and assets
config.module.rules.push({
test: /\.(woff|woff2|eot|ttf|otf)$/,
use: {
loader: 'file-loader',
options: {
outputPath: 'static/fonts/',
publicPath: '/_next/static/fonts/',
},
},
});
return config;
},
// This is required to support PostHog trailing slash API requests
skipTrailingSlashRedirect: true,
compiler: {
removeConsole:
process.env.NODE_ENV === "production" ? { exclude: ["error"] } : false,
},
experimental: {
//viewTransition: true,
// serverSourceMaps: false,
// optimizePackageImports: [
// "@fortawesome/font-awesome-svg-core",
// "@fortawesome/react-fontawesome",
// "@awesome.me/kit-92824ea147",
// ],
},
// productionBrowserSourceMaps: false,
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
// ignoreDuringBuilds: true,
},
typescript: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
// your project has type errors.
// !! WARN !!
// ignoreBuildErrors: true,
}
};
export default {
...baseConfig,
experimental: {
//ppr: true,
},
// biome-ignore lint/suspicious/useAwait: redirects is async
async redirects() {
return [
{
source: "/",
destination: "/home",
permanent: false,
},
{
source: "/training",
destination: "/training/series",
permanent: false,
},
{
source: "/coaching",
destination: "/coaching/sessions",
permanent: false,
},
{
source: "/assets",
destination: "/assets/overview",
permanent: false,
},
{
source: "/callai",
destination: "/callai/recordings",
permanent: false,
},
{
source: "/rooms",
destination: "/rooms/rooms",
permanent: false,
},
{
source: "/analytics",
destination: "/analytics/overview",
permanent: false,
},
];
},
} as NextConfig;