[WEB-5413] feat: adding sentry error handling in web, space and admin (#8099)

This commit is contained in:
sriram veeraghanta 2025-11-12 19:03:47 +05:30 committed by GitHub
parent 0b78e03055
commit 30da349475
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 872 additions and 414 deletions

View file

@ -1,26 +1,23 @@
import path from "node:path";
import { reactRouter } from "@react-router/dev/vite";
import dotenv from "dotenv";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import { joinUrlPath } from "@plane/utils";
dotenv.config({ path: path.resolve(__dirname, ".env") });
// Automatically expose all environment variables prefixed with NEXT_PUBLIC_
const publicEnv = Object.keys(process.env)
.filter((key) => key.startsWith("NEXT_PUBLIC_"))
.reduce<Record<string, string>>((acc, key) => {
acc[key] = process.env[key] ?? "";
return acc;
// Expose only vars starting with VITE_
const viteEnv = Object.keys(process.env)
.filter((k) => k.startsWith("VITE_"))
.reduce<Record<string, string>>((a, k) => {
a[k] = process.env[k] ?? "";
return a;
}, {});
const basePath = joinUrlPath(process.env.NEXT_PUBLIC_ADMIN_BASE_PATH ?? "", "/") ?? "/";
const basePath = joinUrlPath(process.env.VITE_ADMIN_BASE_PATH ?? "", "/") ?? "/";
export default defineConfig(() => ({
base: basePath,
define: {
"process.env": JSON.stringify(publicEnv),
"process.env": JSON.stringify(viteEnv),
},
build: {
assetsInlineLimit: 0,