Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
rewrites() {
async rewrites() {
return {
fallback: [
// Allow Next.js to serve its own assets (JS chunks, fonts, etc.)
{
source: "/_next/:path*",
destination: "/_next/:path*",
},
// Allow any static assets placed in the public folder (e.g. fonts)
{
source: "/:static(fonts|images|static)/:path*",
destination: "/:static/:path*",
},
{
source: "/favicon.ico",
destination: "/favicon.ico",
},
{
source: "/robots.txt",
destination: "/robots.txt",
},
{
source: "/sitemap.xml",
destination: "/sitemap.xml",
},
// Fallback all other requests to the API handler
{
source: "/",
destination: "/api",
Expand Down