This commit is contained in:
@ -1,4 +1,16 @@
|
||||
import { withSentryConfig } from "@sentry/nextjs";
|
||||
import nextBuildId from "next-build-id";
|
||||
import { fileURLToPath } from "url";
|
||||
import path from "path";
|
||||
|
||||
/**
|
||||
* The current git commit hash.
|
||||
*
|
||||
* @type {string|string} The current git commit hash.
|
||||
*/
|
||||
const buildId = (
|
||||
process.env.GIT_REV || nextBuildId.sync({ dir: path.dirname(fileURLToPath(import.meta.url)) })
|
||||
).substring(0, 7);
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
@ -17,6 +29,9 @@ const nextConfig = {
|
||||
},
|
||||
],
|
||||
},
|
||||
env: {
|
||||
NEXT_PUBLIC_BUILD_ID: buildId,
|
||||
},
|
||||
experimental: {
|
||||
mdxRs: true,
|
||||
},
|
||||
@ -32,7 +47,7 @@ export default withSentryConfig(
|
||||
project: "frontend",
|
||||
url: "https://glitchtip.fascinated.cc/",
|
||||
authToken: process.env.SENTRY_AUTH_TOKEN || "",
|
||||
release: `frontend@${process.env.GIT_REV || "dev"}`,
|
||||
release: `frontend@${buildId}`,
|
||||
},
|
||||
{
|
||||
// For all available options, see:
|
||||
|
Reference in New Issue
Block a user