Files
discord.js/apps/website/next.config.ts
Almeida 7de5b4a349 refactor: remove guide route prefix (#11146)
* refactor: remove guide route prefix

* chore: implement backwards compat redirect

* Change guide redirect destination and permanence

Updated the redirect destination and permanence for the guide route.

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-10-07 09:50:53 +00:00

48 lines
844 B
TypeScript

import type { NextConfig } from 'next';
export default {
reactStrictMode: true,
images: {
dangerouslyAllowSVG: true,
contentDispositionType: 'attachment',
contentSecurityPolicy: "default-src 'self'; frame-src 'none'; sandbox;",
remotePatterns: [
{
protocol: 'http',
hostname: 'localhost',
},
],
},
poweredByHeader: false,
logging: {
fetches: {
fullUrl: true,
},
},
experimental: {
ppr: true,
dynamicOnHover: true,
},
eslint: {
ignoreDuringBuilds: true,
},
reactCompiler: true,
typescript: {
ignoreBuildErrors: true,
},
async redirects() {
return [
{
source: '/static/logo.svg',
destination: '/logo.svg',
permanent: true,
},
{
source: '/guide/:path*',
destination: 'https://discordjs.guide/:path*',
permanent: false,
},
];
},
} satisfies NextConfig;