-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathnext.config.js
More file actions
52 lines (49 loc) · 1.26 KB
/
next.config.js
File metadata and controls
52 lines (49 loc) · 1.26 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
// @ts-check
/** @type {import('next').NextConfig} */
const nextConfig = {
turbopack: {
resolveExtensions: [".mdx", ".tsx", ".ts", ".jsx", ".js", ".mjs", ".json"],
},
allowedDevOrigins: ["localhost", "127.0.0.1"],
webpack: (config) => {
config.resolve.extensionAlias = {
".js": [".ts", ".tsx", ".js"],
};
return config;
},
async rewrites() {
return [
{
source: "/potluck",
destination: "/template/5465909f-7a19-4873-b796-0c6be3ec9f04",
},
];
},
serverExternalPackages: ["yjs", "pino"],
pageExtensions: ["js", "jsx", "ts", "tsx", "md", "mdx"],
images: {
loader: "custom",
loaderFile: "./supabase/supabase-image-loader.js",
remotePatterns: [
{ protocol: "http", hostname: "127.0.0.1", port: "54321" },
{ protocol: "https", hostname: "bdefzwcumgzjwllsnaej.supabase.co" },
],
},
reactCompiler: true,
experimental: {
serverActions: {
bodySizeLimit: "5mb",
},
staleTimes: {
dynamic: 600,
static: 600,
},
},
};
const withMDX = require("@next/mdx")({
extension: /\.mdx?$/,
});
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
module.exports = withBundleAnalyzer(withMDX(nextConfig));