-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathnext.config.mjs
66 lines (60 loc) · 1.19 KB
/
next.config.mjs
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
import { withPlausibleProxy } from "next-plausible";
process.env.SITE_URL = process.env.SITE_URL || process.env.VERCEL_URL || "http://localhost:3000";
const isDev = process.argv.indexOf("dev") !== -1;
const isBuild = process.argv.indexOf("build") !== -1;
if (!process.env.VELITE_STARTED && (isDev || isBuild)) {
process.env.VELITE_STARTED = "1";
const { build } = await import("velite");
await build({
watch: isDev,
clean: !isDev,
inside: "next config",
config: ".config/velite.config.ts",
});
}
/** @type {import("next").NextConfig} */
let nextConfig = {
logging: {
fetches: {
fullUrl: true,
},
},
experimental: {
typedRoutes: true,
mdxRs: true,
ppr: true,
},
devIndicators: {
buildActivity: false,
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "avatars.githubusercontent.com",
},
{
protocol: "https",
hostname: "i.imgur.com",
},
],
},
async headers() {
return [
{
source: "/foobar",
headers: [
{
key: "x-foobar",
value: "/foobar/headers",
},
],
},
];
},
};
nextConfig = withPlausibleProxy({
subdirectory: "prxy/plsbl",
scriptName: "plsbl",
})(nextConfig);
export default nextConfig;