2024-03-26 13:54:42 +00:00
|
|
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
2023-08-08 07:25:42 +00:00
|
|
|
/** @type {import('next').NextConfig} */
|
2023-12-07 09:13:33 +00:00
|
|
|
require("dotenv").config({ path: ".env" });
|
|
|
|
const { withSentryConfig } = require("@sentry/nextjs");
|
2023-08-08 07:25:42 +00:00
|
|
|
|
2023-09-03 15:25:37 +00:00
|
|
|
const nextConfig = {
|
2024-04-29 06:42:33 +00:00
|
|
|
trailingSlash: true,
|
2023-12-20 08:19:17 +00:00
|
|
|
async headers() {
|
|
|
|
return [
|
|
|
|
{
|
|
|
|
source: "/",
|
|
|
|
headers: [{ key: "X-Frame-Options", value: "SAMEORIGIN" }],
|
|
|
|
},
|
|
|
|
];
|
|
|
|
},
|
2023-12-07 09:13:33 +00:00
|
|
|
basePath: process.env.NEXT_PUBLIC_DEPLOY_WITH_NGINX === "1" ? "/spaces" : "",
|
2023-08-21 12:42:41 +00:00
|
|
|
reactStrictMode: false,
|
|
|
|
swcMinify: true,
|
2023-10-27 07:44:03 +00:00
|
|
|
images: {
|
2023-12-20 08:19:17 +00:00
|
|
|
remotePatterns: [
|
|
|
|
{
|
|
|
|
protocol: "https",
|
|
|
|
hostname: "**",
|
|
|
|
},
|
|
|
|
],
|
2023-10-27 07:44:03 +00:00
|
|
|
unoptimized: true,
|
|
|
|
},
|
2023-08-21 19:43:51 +00:00
|
|
|
output: "standalone",
|
2023-09-03 15:25:37 +00:00
|
|
|
};
|
2023-08-08 07:25:42 +00:00
|
|
|
|
2024-04-02 11:15:18 +00:00
|
|
|
if (parseInt(process.env.NEXT_PUBLIC_ENABLE_SENTRY || "0", 10)) {
|
2024-03-26 13:54:42 +00:00
|
|
|
module.exports = withSentryConfig(nextConfig,
|
|
|
|
{ silent: true, authToken: process.env.SENTRY_AUTH_TOKEN },
|
|
|
|
{ hideSourceMaps: true }
|
|
|
|
);
|
2023-09-03 15:25:37 +00:00
|
|
|
} else {
|
|
|
|
module.exports = nextConfig;
|
|
|
|
}
|