Files
plane/web/next.config.js

48 lines
1.1 KiB
JavaScript
Raw Normal View History

2024-03-26 19:24:42 +05:30
/* eslint-disable @typescript-eslint/no-var-requires */
require("dotenv").config({ path: ".env" });
const { withSentryConfig } = require("@sentry/nextjs");
2022-11-19 19:51:26 +05:30
const nextConfig = {
2024-04-06 17:13:24 +05:30
reactStrictMode: false,
swcMinify: true,
output: "standalone",
async headers() {
return [
{
source: "/(.*)?",
headers: [{ key: "X-Frame-Options", value: "SAMEORIGIN" }],
},
];
},
2022-11-19 19:51:26 +05:30
images: {
remotePatterns: [
{
protocol: "https",
hostname: "**",
},
],
unoptimized: true,
2022-11-19 19:51:26 +05:30
},
2024-04-06 17:13:24 +05:30
async rewrites() {
return [
{
source: "/ingest/static/:path*",
destination: "https://us-assets.i.posthog.com/static/:path*",
},
{
source: "/ingest/:path*",
destination: "https://us.i.posthog.com/:path*",
},
]
}
2022-11-19 19:51:26 +05:30
};
2024-04-02 16:45:18 +05:30
if (parseInt(process.env.NEXT_PUBLIC_ENABLE_SENTRY || "0", 10)) {
2024-03-26 19:24:42 +05:30
module.exports = withSentryConfig(nextConfig,
{ silent: true, authToken: process.env.SENTRY_AUTH_TOKEN },
{ hideSourceMaps: true }
);
2023-02-08 20:44:35 +05:30
} else {
module.exports = nextConfig;
}