mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
Compare commits
2 Commits
chore-comm
...
chore/runt
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ce27009b2 | ||
|
|
ce1d8e8dd5 |
12
web/app/env-setup.tsx
Normal file
12
web/app/env-setup.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
"use server";
|
||||
|
||||
import { unstable_noStore as noStore } from "next/cache";
|
||||
|
||||
export default async function getEnvVariables() {
|
||||
noStore();
|
||||
|
||||
return {
|
||||
plausible: process.env.PLAUSIBLE_DOMAIN,
|
||||
adminBase: process.env.NEXT_PUBLIC_ADMIN_BASE_URL,
|
||||
};
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import "@/styles/react-day-picker.css";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// local
|
||||
import getEnvVariables from "./env-setup";
|
||||
import { AppProvider } from "./provider";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
@@ -27,9 +28,12 @@ export const metadata: Metadata = {
|
||||
},
|
||||
};
|
||||
|
||||
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
||||
export default async function RootLayout({ children }: { children: React.ReactNode }) {
|
||||
const isSessionRecorderEnabled = parseInt(process.env.NEXT_PUBLIC_ENABLE_SESSION_RECORDER || "0");
|
||||
|
||||
const envVars = await getEnvVariables();
|
||||
console.log("envVars", envVars);
|
||||
|
||||
return (
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
@@ -7,7 +7,7 @@ const nextConfig = {
|
||||
trailingSlash: true,
|
||||
reactStrictMode: false,
|
||||
swcMinify: true,
|
||||
output: "standalone",
|
||||
// output: "standalone",
|
||||
async headers() {
|
||||
return [
|
||||
{
|
||||
@@ -56,7 +56,7 @@ const nextConfig = {
|
||||
];
|
||||
},
|
||||
async rewrites() {
|
||||
const posthogHost = process.env.NEXT_PUBLIC_POSTHOG_HOST || "https://app.posthog.com"
|
||||
const posthogHost = process.env.NEXT_PUBLIC_POSTHOG_HOST || "https://app.posthog.com";
|
||||
const rewrites = [
|
||||
{
|
||||
source: "/ingest/static/:path*",
|
||||
@@ -74,7 +74,7 @@ const nextConfig = {
|
||||
rewrites.push({
|
||||
source: "/god-mode",
|
||||
destination: `${GOD_MODE_BASE_URL}/`,
|
||||
})
|
||||
});
|
||||
rewrites.push({
|
||||
source: "/god-mode/:path*",
|
||||
destination: `${GOD_MODE_BASE_URL}/:path*`,
|
||||
@@ -113,8 +113,7 @@ const sentryConfig = {
|
||||
// https://docs.sentry.io/product/crons/
|
||||
// https://vercel.com/docs/cron-jobs
|
||||
automaticVercelMonitors: true,
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
if (parseInt(process.env.SENTRY_MONITORING_ENABLED || "0", 10)) {
|
||||
module.exports = withSentryConfig(nextConfig, sentryConfig);
|
||||
|
||||
Reference in New Issue
Block a user