plane/space/next.config.js

34 lines
801 B
JavaScript
Raw Permalink Normal View History

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
if (parseInt(process.env.NEXT_PUBLIC_ENABLE_SENTRY || "0")) {
module.exports = withSentryConfig(nextConfig, { silent: true }, { hideSourceMaps: true });
} else {
module.exports = nextConfig;
}