Files
deckyvault/next.config.ts
T
adrianbonpin bcf2d540b8 chore: format components, switch to CDN hostname, and improve error handling in game stats
- Format long lines and union types in game page, preset modal, games page, and filter drawer
- Replace **.r2.dev with cdn.deckyvault.xyz in next.config image hostnames
- Replace sql ANY with drizzle inArray for hardware query in game stats
- Add try/catch error handler in game stats route
- Add post.md to .gitignore
2026-05-10 04:15:38 +08:00

57 lines
1.3 KiB
TypeScript

import type { NextConfig } from "next";
import withSerwist from "@serwist/next";
import { version } from "./package.json";
const nextConfig: NextConfig = {
env: {
NEXT_PUBLIC_APP_VERSION: version,
},
// Elysia is Bun-native and must not be bundled by Next.js
serverExternalPackages: ["elysia", "@elysiajs/eden"],
images: {
remotePatterns: [
{
protocol: "https",
hostname: "cdn.akamai.steamstatic.com",
port: "",
pathname: "/steam/apps/**",
},
{
protocol: "https",
hostname: "shared.akamai.steamstatic.com",
port: "",
pathname: "/store_item_assets/**",
},
{
protocol: "https",
hostname: "cdn.steamgriddb.com",
},
{
protocol: "https",
hostname: "cdn2.steamgriddb.com",
},
// Google
{
protocol: 'https',
hostname: 'lh3.googleusercontent.com'
},
// Discord
{
protocol: 'https',
hostname: 'cdn.discordapp.com'
},
// Cloudflare R2
{
protocol: "https",
hostname: "cdn.deckyvault.xyz",
}
],
},
};
export default withSerwist({
swSrc: "app/sw.ts",
swDest: "public/sw.js",
disable: process.env.NODE_ENV === "development",
})(nextConfig);