Repository navigation
Expand file tree
/
Copy pathnext.config.ts
More file actions
74 lines (71 loc) · 1.63 KB
/
Copy pathnext.config.ts
File metadata and controls
74 lines (71 loc) · 1.63 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
import type { NextConfig } from "next";
import createNextIntlPlugin from "next-intl/plugin";
import path from "path";
const withNextIntl = createNextIntlPlugin({
experimental: {
createMessagesDeclaration: "./messages/en.json",
},
});
const nextConfig: NextConfig = {
output: 'standalone',
images: {
remotePatterns: [
{
protocol: "https",
hostname: "avatars.githubusercontent.com",
port: "",
pathname: "/**",
},
{
protocol: "https",
hostname: "framagit.org",
port: "",
pathname: "/**",
},
],
qualities: [25, 50, 75, 100],
},
turbopack: {
root: path.join(__dirname),
},
typescript: {
ignoreBuildErrors: true,
},
async headers() {
return [
{
source: "/:all*(svg|jpg|jpeg|png|webp|ico|woff2|woff)",
headers: [
{
key: "Cache-Control",
value: "public, max-age=31536000, immutable",
},
],
},
{
source: "/:locale(en|fa)/:path*",
headers: [
{
key: "Cache-Control",
value: "public, max-age=3600, stale-while-revalidate=86400",
},
],
},
];
},
async redirects() {
return [
{
source: "/fa/blog/a-linux-distribution-that-leaves-no-one-behind",
destination: "/fa/blog/parch-accessibility",
permanent: true,
},
{
source: "/en/blog/parch-accessibility",
destination: "/en/blog/a-linux-distribution-that-leaves-no-one-behind",
permanent: true,
},
];
},
};
export default withNextIntl(nextConfig);