[WEB-5413] feat: adding sentry error handling in web, space and admin (#8099)
This commit is contained in:
parent
0b78e03055
commit
30da349475
33 changed files with 872 additions and 414 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue