-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.ts
30 lines (28 loc) · 1016 Bytes
/
next.config.ts
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
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
experimental: { // Enable experimental features
staleTimes: { // Configure the stale time for the cache
dynamic: 30, // Set the stale time for dynamic pages to 30 seconds
},
},
// Describe in the lucia documentation
serverExternalPackages: ["@node-rs/argon2"], // Add the argon2 package to the server
images: { // Configure the image loader
remotePatterns: [ // Match any image URL
{
protocol: "https", // Match any protocol
hostname: "utfs.io", // Match the hostname
pathname: `/a/${process.env.NEXT_PUBLIC_UPLOADTHING_APP_ID}/*`, // Match the pathname
},
],
},
rewrites: async () => { // Define the rewrites
return [ // Return an array of rewrites
{
source: "/hashtag/:tag", // Match the hashtag route
destination: "/search?q=%23:tag", // Redirect to the search route with the hashtag query
},
];
}
};
export default nextConfig;