plane/space/next.config.js

38 lines
914 B
JavaScript
Raw Normal View History

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} */
require("dotenv").config({ path: ".env" });
const { withSentryConfig } = require("@sentry/nextjs");
2023-08-08 07:25:42 +00:00
const nextConfig = {
async headers() {
return [
{
source: "/",
headers: [{ key: "X-Frame-Options", value: "SAMEORIGIN" }],
},
];
},
basePath: process.env.NEXT_PUBLIC_DEPLOY_WITH_NGINX === "1" ? "/spaces" : "",
reactStrictMode: false,
swcMinify: true,
images: {
remotePatterns: [
{
protocol: "https",
hostname: "**",
},
],
unoptimized: true,
},
output: "standalone",
};
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 }
);
} else {
module.exports = nextConfig;
}