a tool for shared writing and social publishing
1// @ts-check 2 3/** @type {import('next').NextConfig} */ 4const nextConfig = { 5 turbopack: { 6 resolveExtensions: [".mdx", ".tsx", ".ts", ".jsx", ".js", ".mjs", ".json"], 7 }, 8 allowedDevOrigins: ["localhost", "127.0.0.1"], 9 webpack: (config) => { 10 config.resolve.extensionAlias = { 11 ".js": [".ts", ".tsx", ".js"], 12 }; 13 14 return config; 15 }, 16 async rewrites() { 17 return [ 18 { 19 source: "/potluck", 20 destination: "/template/5465909f-7a19-4873-b796-0c6be3ec9f04", 21 }, 22 ]; 23 }, 24 pageExtensions: ["js", "jsx", "ts", "tsx", "md", "mdx"], 25 images: { 26 loader: "custom", 27 loaderFile: "./supabase/supabase-image-loader.js", 28 remotePatterns: [ 29 { protocol: "http", hostname: "127.0.0.1", port: "54321" }, 30 { protocol: "https", hostname: "bdefzwcumgzjwllsnaej.supabase.co" }, 31 ], 32 }, 33 experimental: { 34 reactCompiler: true, 35 serverActions: { 36 bodySizeLimit: "5mb", 37 }, 38 staleTimes: { 39 dynamic: 600, 40 static: 600, 41 }, 42 }, 43}; 44 45const withMDX = require("@next/mdx")({ 46 extension: /\.mdx?$/, 47}); 48const withBundleAnalyzer = require("@next/bundle-analyzer")({ 49 enabled: process.env.ANALYZE === "true", 50}); 51module.exports = withBundleAnalyzer(withMDX(nextConfig));