2024-04-21 18:48:24 +00:00
|
|
|
import { withSentryConfig } from "@sentry/nextjs";
|
2024-04-21 19:18:01 +00:00
|
|
|
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);
|
2024-04-21 17:23:29 +00:00
|
|
|
|
2024-04-14 16:45:04 +00:00
|
|
|
/** @type {import('next').NextConfig} */
|
|
|
|
const nextConfig = {
|
|
|
|
output: "standalone",
|
2024-04-14 17:46:37 +00:00
|
|
|
images: {
|
2024-04-21 18:48:24 +00:00
|
|
|
remotePatterns: [
|
|
|
|
{
|
|
|
|
protocol: "https",
|
|
|
|
hostname: "git.fascinated.cc",
|
|
|
|
pathname: "/**",
|
|
|
|
},
|
2024-04-14 18:55:07 +00:00
|
|
|
{
|
|
|
|
protocol: "https",
|
|
|
|
hostname: "api.mcutils.xyz",
|
|
|
|
pathname: "/**",
|
|
|
|
},
|
2024-04-14 17:46:37 +00:00
|
|
|
],
|
|
|
|
},
|
2024-04-21 19:18:01 +00:00
|
|
|
env: {
|
|
|
|
NEXT_PUBLIC_BUILD_ID: buildId,
|
|
|
|
},
|
2024-04-21 04:47:52 +00:00
|
|
|
experimental: {
|
|
|
|
mdxRs: true,
|
|
|
|
},
|
2024-04-14 16:45:04 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 18:48:24 +00:00
|
|
|
export default withSentryConfig(
|
|
|
|
nextConfig,
|
|
|
|
{
|
|
|
|
// For all available options, see:
|
|
|
|
// https://github.com/getsentry/sentry-webpack-plugin#options
|
|
|
|
silent: true,
|
|
|
|
org: "minecraft-utilities",
|
|
|
|
project: "frontend",
|
|
|
|
url: "https://glitchtip.fascinated.cc/",
|
|
|
|
authToken: process.env.SENTRY_AUTH_TOKEN || "",
|
2024-04-21 19:18:01 +00:00
|
|
|
release: `frontend@${buildId}`,
|
2024-04-21 18:48:24 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
// For all available options, see:
|
|
|
|
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
|
2024-04-21 17:23:29 +00:00
|
|
|
|
2024-04-21 18:48:24 +00:00
|
|
|
// Upload a larger set of source maps for prettier stack traces (increases build time)
|
|
|
|
widenClientFileUpload: true,
|
2024-04-21 17:23:29 +00:00
|
|
|
|
2024-04-21 18:48:24 +00:00
|
|
|
// Hides source maps from generated client bundles
|
|
|
|
hideSourceMaps: true,
|
2024-04-21 17:23:29 +00:00
|
|
|
|
2024-04-21 18:48:24 +00:00
|
|
|
// Automatically tree-shake Sentry logger statements to reduce bundle size
|
|
|
|
disableLogger: true,
|
|
|
|
},
|
|
|
|
);
|