mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 01:35:39 -04:00
33 lines
650 B
TypeScript
33 lines
650 B
TypeScript
import { execSync } from "node:child_process";
|
|
import type { NextConfig } from "next";
|
|
|
|
process.env.GIT_COMMIT_SHA = (() => {
|
|
try {
|
|
return execSync("git rev-parse --short HEAD", {
|
|
encoding: "utf-8",
|
|
}).trim();
|
|
} catch {
|
|
return "unknown";
|
|
}
|
|
})();
|
|
|
|
const imageBaseUrl = process.env.TMDB_IMAGE_BASE_URL || "";
|
|
const imageHost = imageBaseUrl
|
|
? new URL(imageBaseUrl).hostname
|
|
: "image.tmdb.org";
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
reactCompiler: true,
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: "https",
|
|
hostname: imageHost,
|
|
},
|
|
],
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|