mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
Compare commits
2 Commits
pnpm-file-
...
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
|
// helpers
|
||||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||||
// local
|
// local
|
||||||
|
import getEnvVariables from "./env-setup";
|
||||||
import { AppProvider } from "./provider";
|
import { AppProvider } from "./provider";
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
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 isSessionRecorderEnabled = parseInt(process.env.NEXT_PUBLIC_ENABLE_SESSION_RECORDER || "0");
|
||||||
|
|
||||||
|
const envVars = await getEnvVariables();
|
||||||
|
console.log("envVars", envVars);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const nextConfig = {
|
|||||||
trailingSlash: true,
|
trailingSlash: true,
|
||||||
reactStrictMode: false,
|
reactStrictMode: false,
|
||||||
swcMinify: true,
|
swcMinify: true,
|
||||||
output: "standalone",
|
// output: "standalone",
|
||||||
async headers() {
|
async headers() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
@@ -56,7 +56,7 @@ const nextConfig = {
|
|||||||
];
|
];
|
||||||
},
|
},
|
||||||
async rewrites() {
|
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 = [
|
const rewrites = [
|
||||||
{
|
{
|
||||||
source: "/ingest/static/:path*",
|
source: "/ingest/static/:path*",
|
||||||
@@ -74,7 +74,7 @@ const nextConfig = {
|
|||||||
rewrites.push({
|
rewrites.push({
|
||||||
source: "/god-mode",
|
source: "/god-mode",
|
||||||
destination: `${GOD_MODE_BASE_URL}/`,
|
destination: `${GOD_MODE_BASE_URL}/`,
|
||||||
})
|
});
|
||||||
rewrites.push({
|
rewrites.push({
|
||||||
source: "/god-mode/:path*",
|
source: "/god-mode/:path*",
|
||||||
destination: `${GOD_MODE_BASE_URL}/:path*`,
|
destination: `${GOD_MODE_BASE_URL}/:path*`,
|
||||||
@@ -113,8 +113,7 @@ const sentryConfig = {
|
|||||||
// https://docs.sentry.io/product/crons/
|
// https://docs.sentry.io/product/crons/
|
||||||
// https://vercel.com/docs/cron-jobs
|
// https://vercel.com/docs/cron-jobs
|
||||||
automaticVercelMonitors: true,
|
automaticVercelMonitors: true,
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
if (parseInt(process.env.SENTRY_MONITORING_ENABLED || "0", 10)) {
|
if (parseInt(process.env.SENTRY_MONITORING_ENABLED || "0", 10)) {
|
||||||
module.exports = withSentryConfig(nextConfig, sentryConfig);
|
module.exports = withSentryConfig(nextConfig, sentryConfig);
|
||||||
|
|||||||
Reference in New Issue
Block a user